This file serves to be a supplementary document that describes all the statistics results performed for this project. It may help to test some new questions that are not included in the corresponding slides.
This file displays the results of the FaceWord project (data collected at NYU). There are two experiments in this project. In Experiment 1, Chinese participants viewed faces and Chinese characters in four conditions (Layout: intact, exchange [top and bottom parts were switched], top and bottom) and completed an additional localizer (Chinese faces, Chinese characters, objects, scrambled objects). In Experiment 2, English speakers viewed Chinese characters and English words in four conditions (Layout: intact, exchange, top [top parts of Chinese characters; left two letters for English words] and bottom [bottom parts of Chinese characters; right four letters for English words]) and completed an additional localizer (Caucasian faces, English words, objects, scrambled objects).
For the main runs, analysis is conducted for each ROI separately (FFA1, FFA2, VWFA, LOC).
For each ROI, three analyses are performed:
libsvm is used to decode different condition pairs (see below) and one-tail one-sample t-tests is used to test if the pair of conditions can be decoded [whether the accuracy is significantly larger than the chancel level (0.5); one-tail one-sample t-tests]. Leave-one(-run)-out cross-validation is applied. No normalized or demean were used.
The probability was estimated for each particiapnt separately:
libsvm) is trained with the patterns of intact vs. exchange (10 runs).# set the order of levels in factors
loc_order <- c("face", "object", "word", "scrambled")
faceword_order <- c("faces", "words")
words_order <- c("English", "Chinese")
layout_order <- c("intact", "exchange", "top", "bottom")
roi_order <- c("FFA1", "FFA2", "VWFA", "LO")
label_FFA1 <- c("roi.lh.f-vs-o.ffa1.label", "roi.rh.f-vs-o.ffa1.label")
label_FFA2 <- c("roi.lh.f-vs-o.ffa2.label", "roi.rh.f-vs-o.ffa2.label")
label_VWFA <- "roi.lh.word-vs-face-object-scrambled.label"
label_LO <- c("roi.lh.o-vs-scr.label", "roi.rh.o-vs-scr.label")
# criterion of vertex number
nVtx_size_min <- 30 # mm^2
# set up the theme for plot and rainclound plot
# load all the R files in "Utilities/"
tmp <- sapply(list.files('Utilities', "*.R", full.names = TRUE, recursive = TRUE), source)
activationUL <- 2.75
onesample0 <- 0.3 # the staring point of y axis (for one-sample t-tests)
nDigitals <- 3 # number of digitials of p-values in plots
pair_order_E1 <- c("face_intact-word_intact",
"face_intact-face_exchange",
"face_top-face_bottom",
"word_intact-word_exchange",
"word_top-word_bottom")
df_label <- read_csv(file.path("data", "faceword_E1_Label_HJ.csv")) %>%
mutate(roi = str_remove(Label, "roi."),
roi = str_remove(roi, ".label")) %>%
mutate(Subject = str_replace(SubjCode, "\\_.*", ""))
# df_label %>% head()
df_label %>%
select(SubjCode, roi, Size) %>%
pivot_wider(names_from = roi, values_from = Size) %>%
arrange(SubjCode)
The above table displays the size (in mm2) of each label for each participant. (NA denotes that this label is not available for that particiapnt.)
df_label %>%
select(SubjCode, roi, NVtxs) %>%
pivot_wider(names_from = roi, values_from = NVtxs) %>%
arrange(SubjCode)
The above table displays the number of vertices for each label and each participant. (NA denotes that this label is not available for that particiapnt.)
df_label %>%
group_by(Label, roi) %>%
summarize(Count = n(),
meanSize = mean(Size),
SDSize = sd(Size),
meanNVtx = mean(NVtxs),
SDNVtx = sd(NVtxs))
df_nlabel <- df_label %>%
filter(Size > nVtx_size_min) %>%
group_by(Label, roi) %>%
summarize(Count = n(),
meanSize = mean(Size),
SDSize = sd(Size),
meanNVtx = mean(NVtxs),
SDNVtx = sd(NVtxs))
df_nlabel
The above table dispalys the number of participants included in the following analyses for each ROI. (VWFA is only found on the left hemisphere.)
# load data file from functional scans for univerate analysis
df_uni_E1 <- read_csv(file.path("data", "faceword_E1_Uni_HJ.csv"))
head(df_uni_E1)
df_clean_uni_E1 <- {
df_uni_E1 %>%
filter(Response != "NaN") %>%
separate(Condition, c("FaceWord", "Layout"), "_") %>% # separate the conditions into two IVs
mutate(FaceWord = gsub("face", "faces", FaceWord),
FaceWord = gsub("word", "words", FaceWord),
Layout = factor(Layout, levels = layout_order), # convert the two IVs to factors
Hemisphere = if_else(grepl("lh", Label), "left", if_else(grepl("rh", Label), "right", "NA"))) %>%
select(Hemisphere, Label, SessCode, FaceWord, Layout, Response) %>%
mutate(Subject = str_replace(SessCode, "\\_.*", "")) %>%
left_join(df_label, by = c("Label", "Subject")) %>%
filter(Size > nVtx_size_min)
}
head(df_clean_uni_E1)
df_area_uni_E1 <- read_csv(file.path("data_roi_area", "faceword_E1_Uni_area_HJ.csv"))
df_clean_area_uni_E1 <- {
df_area_uni_E1 %>%
filter(Response != "NaN") %>%
separate(Condition, c("FaceWord", "Layout"), "_") %>% # separate the conditions into two IVs
mutate(FaceWord = gsub("face", "faces", FaceWord),
FaceWord = gsub("word", "words", FaceWord),
Layout = factor(Layout, levels = layout_order), # convert the two IVs to factors
Hemisphere = if_else(grepl("lh", Label), "left", if_else(grepl("rh", Label), "right", "NA"))) %>%
select(Hemisphere, Label, SessCode, FaceWord, Layout, Area, Response) %>%
mutate(Subject = str_replace(SessCode, "\\_.*", ""))
}
head(df_clean_area_uni_E1)
df_decode_E1 <- read_csv(file.path("data", "faceword_E1_Decode_noz.csv"))
head(df_decode_E1)
df_clean_decode_E1 <- df_decode_E1 %>%
select(Label, SessCode, ClassifyPair, ACC) %>%
mutate(Hemisphere = if_else(grepl("lh", Label), "left",
if_else(grepl("rh", Label), "right", "NA")),
Subject = str_remove(SessCode, "\\_.*")) %>%
left_join(df_label, by = c("Label", "Subject")) %>%
filter(Size > nVtx_size_min)
df_decode_acc_E1 <- df_clean_decode_E1 %>%
group_by(Hemisphere, Label, SessCode, ClassifyPair) %>% # divide the data into groups by these columns
summarize(Accuracy = mean(ACC), Count = n()) %>%
ungroup()
df_decode_acc_E1
df_decode_area_E1 <- read_csv(file.path("data_roi_area", "faceword_roi_area_E1_Decode_noz.csv"))
head(df_decode_area_E1)
df_decode_area_acc_E1 <- df_decode_area_E1 %>%
select(Label, SessCode, ClassifyPair, ACC) %>%
mutate(Hemisphere = if_else(grepl("lh", Label), "left",
if_else(grepl("rh", Label), "right", "NA")),
Area = str_extract(Label, "a\\d"), # find the area
Subject = str_remove(SessCode, "\\_.*")) %>%
group_by(Hemisphere, Label, SessCode, ClassifyPair) %>% # divide the data into groups by these columns
summarize(Accuracy = mean(ACC), Count = n()) %>%
ungroup()
df_decode_area_acc_E1
df_simi <- read_csv(file.path("data", "faceword_E1_Similarity_noz.csv"))
head(df_simi)
df_clean_simi_E1 <- df_simi %>%
mutate(asExchange = if_else(grepl("exchange", PredictCond), 1, 0), # binary prediction
pExchange = Probability_2, # probability prediction
Subject = str_remove(SessCode, "\\_.*")) %>%
left_join(df_label, by = c("Label", "Subject")) %>%
filter(Size > nVtx_size_min)
df_rate_simi_E1 <- df_clean_simi_E1 %>%
group_by(SessCode, Label, ClassPair_1, Combination) %>%
summarize(binaryAsExchange = mean(asExchange),
pAsExchange = mean(pExchange),
RateAsExchange = pAsExchange) %>% # use the probability instead of the categorical prediction
ungroup() %>%
mutate(Hemisphere = if_else(grepl("lh", Label), 'left', if_else(grepl("rh", Label), "right", "NA")))
head(df_rate_simi_E1)
# only keep data for these two labels
df_uni_E1_FFA1 <- filter(df_clean_uni_E1, Label %in% label_FFA1)
df_decode_E1_FFA1 <- filter(df_decode_acc_E1, Label %in% label_FFA1)
df_simi_E1_FFA1 <- filter(df_rate_simi_E1, Label %in% label_FFA1)
df_uni_E1_FFA1 %>%
select(Hemisphere, Label, SessCode) %>%
distinct() %>%
group_by(Hemisphere, Label) %>%
summarize(Count = n())
anova_E1_lFFA1 <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_FFA1, Label == label_FFA1[[1]]))
anova_E1_lFFA1
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 11 0.26 1.57 .025 .237
## 2 Layout 1.81, 19.96 0.04 8.00 ** .038 .003
## 3 FaceWord:Layout 2.32, 25.57 0.03 3.67 * .015 .034
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E1_lFFA1 <- emmeans(anova_E1_lFFA1, ~ FaceWord * Layout)
emm_aov_E1_lFFA1 %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E1_lFFA1, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words 0.13 0.104 11 1.252 0.2366
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E1_lFFA1, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.0582 0.0467 33 1.247 0.6020
## intact - top 0.2079 0.0467 33 4.454 0.0005
## intact - bottom 0.1536 0.0467 33 3.290 0.0122
## exchange - top 0.1497 0.0467 33 3.207 0.0150
## exchange - bottom 0.0953 0.0467 33 2.042 0.1935
## top - bottom -0.0544 0.0467 33 -1.164 0.6530
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E1_lFFA1 <- contrast(emm_aov_E1_lFFA1, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_anova_E1, interaction = "pairwise") # , adjust = "none"
contr_aov_E1_lFFA1
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words 0.2186 0.1165 17.0 1.877 0.0778
## exchange . faces - words 0.0283 0.1165 17.0 0.243 0.8107
## top . faces - words 0.2428 0.1165 17.0 2.084 0.0525
## bottom . faces - words 0.0304 0.1165 17.0 0.261 0.7974
## . faces intact - exchange 0.1534 0.0635 65.6 2.415 0.0185
## . faces intact - top 0.1958 0.0635 65.6 3.084 0.0030
## . faces intact - bottom 0.2477 0.0635 65.6 3.900 0.0002
## . faces exchange - top 0.0425 0.0635 65.6 0.669 0.5061
## . faces exchange - bottom 0.0943 0.0635 65.6 1.485 0.1423
## . faces top - bottom 0.0519 0.0635 65.6 0.817 0.4171
## . words intact - exchange -0.0369 0.0635 65.6 -0.581 0.5630
## . words intact - top 0.2200 0.0635 65.6 3.464 0.0009
## . words intact - bottom 0.0594 0.0635 65.6 0.936 0.3528
## . words exchange - top 0.2569 0.0635 65.6 4.046 0.0001
## . words exchange - bottom 0.0963 0.0635 65.6 1.517 0.1340
## . words top - bottom -0.1606 0.0635 65.6 -2.528 0.0139
2(face vs. word) \(\times\) 2(intact vs. exchange) ANOVA
anova_E1_lFFA1_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_FFA1,
Label == label_FFA1[[1]],
Layout %in% c("intact", "exchange")))
anova(anova_E1_lFFA1_ie, "pes")
contrast(emmeans(anova_E1_lFFA1_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words 0.123 0.111 11 1.115 0.2886
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_lFFA1_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.0582 0.0429 11 1.357 0.2018
##
## Results are averaged over the levels of: FaceWord
emm_E1_lFFA1_ie <- emmeans(anova_E1_lFFA1_ie, ~ FaceWord + Layout)
contrast(emm_E1_lFFA1_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words intact - exchange 0.19 0.0887 11 2.145 0.0552
(simple_E1_lFFA1_ie <- pairs(emm_E1_lFFA1_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words 0.2186 0.1193 14.4 1.833 0.0876
## exchange . faces - words 0.0283 0.1193 14.4 0.238 0.8156
## . faces intact - exchange 0.1534 0.0617 22.0 2.485 0.0210
## . words intact - exchange -0.0369 0.0617 22.0 -0.598 0.5557
2(face vs. word) \(\times\) 2(top vs. bottom) ANOVA
anova_E1_lFFA1_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_FFA1,
Label == label_FFA1[[1]],
Layout %in% c("top", "bottom")))
anova(anova_E1_lFFA1_tb, "pes")
contrast(emmeans(anova_E1_lFFA1_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words 0.137 0.107 11 1.273 0.2294
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_lFFA1_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## top - bottom -0.0544 0.04 11 -1.358 0.2016
##
## Results are averaged over the levels of: FaceWord
emm_E1_lFFA1_tb <- emmeans(anova_E1_lFFA1_tb, ~ FaceWord + Layout)
contrast(emm_E1_lFFA1_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words top - bottom 0.212 0.0746 11 2.848 0.0158
(simple_E1_lFFA1_tb <- pairs(emm_E1_lFFA1_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## top . faces - words 0.2428 0.1136 13.6 2.137 0.0513
## bottom . faces - words 0.0304 0.1136 13.6 0.267 0.7932
## . faces top - bottom 0.0519 0.0547 21.9 0.948 0.3534
## . words top - bottom -0.1606 0.0547 21.9 -2.936 0.0077
anova_E1_lFFA1_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E1 %>%
filter(grepl("lh.f-vs-o.ffa1", Label)))
anova_E1_lFFA1_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 12 0.71 0.07 <.001 .800
## 2 Layout 1.76, 21.16 0.16 8.77 ** .044 .002
## 3 Area 1.08, 12.99 0.12 1.09 .003 .322
## 4 FaceWord:Layout 2.55, 30.65 0.08 5.03 ** .020 .008
## 5 FaceWord:Area 1.09, 13.10 0.02 10.35 ** .005 .006
## 6 Layout:Area 2.25, 26.97 0.00 6.21 ** <.001 .005
## 7 FaceWord:Layout:Area 2.11, 25.33 0.00 3.40 * <.001 .047
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E1_lFFA1_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## faces - words X50 0.08284 0.0839 12.9 0.987 0.3419
## faces - words X100 0.05433 0.0839 12.9 0.647 0.5289
## faces - words X200 -0.00769 0.0839 12.9 -0.092 0.9284
## faces - words X300 -0.04397 0.0839 12.9 -0.524 0.6093
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_lFFA1_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 0.0462 0.0427 37.9 1.081 0.2865
## intact - top X50 0.2071 0.0427 37.9 4.851 <.0001
## intact - bottom X50 0.1671 0.0427 37.9 3.915 0.0004
## exchange - top X50 0.1609 0.0427 37.9 3.770 0.0006
## exchange - bottom X50 0.1209 0.0427 37.9 2.833 0.0073
## top - bottom X50 -0.0400 0.0427 37.9 -0.937 0.3549
## intact - exchange X100 0.0337 0.0427 37.9 0.790 0.4346
## intact - top X100 0.1954 0.0427 37.9 4.578 <.0001
## intact - bottom X100 0.1446 0.0427 37.9 3.387 0.0017
## exchange - top X100 0.1617 0.0427 37.9 3.788 0.0005
## exchange - bottom X100 0.1109 0.0427 37.9 2.597 0.0133
## top - bottom X100 -0.0508 0.0427 37.9 -1.191 0.2410
## intact - exchange X200 0.0160 0.0427 37.9 0.375 0.7098
## intact - top X200 0.1791 0.0427 37.9 4.196 0.0002
## intact - bottom X200 0.1124 0.0427 37.9 2.633 0.0122
## exchange - top X200 0.1631 0.0427 37.9 3.821 0.0005
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E1_lFFA1_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange faces - words X50 0.259 0.0755 39.5 3.429 0.0014
## intact - exchange faces - words X100 0.230 0.0755 39.5 3.050 0.0041
## intact - exchange faces - words X200 0.194 0.0755 39.5 2.573 0.0140
## intact - exchange faces - words X300 0.170 0.0755 39.5 2.247 0.0303
(sim_area_E1_lFFA1_ie <-contrast(emmeans(anova_E1_lFFA1_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)])
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange faces X50 0.1756 0.057 75.8 3.082 0.0029
## intact - exchange words X50 -0.0833 0.057 75.8 -1.462 0.1479
## intact - exchange faces X100 0.1488 0.057 75.8 2.612 0.0108
## intact - exchange words X100 -0.0814 0.057 75.8 -1.429 0.1572
## intact - exchange faces X200 0.1131 0.057 75.8 1.985 0.0507
## intact - exchange words X200 -0.0811 0.057 75.8 -1.424 0.1586
## intact - exchange faces X300 0.0852 0.057 75.8 1.496 0.1388
## intact - exchange words X300 -0.0844 0.057 75.8 -1.481 0.1428
anova_E1_rFFA1 <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_FFA1, Label == label_FFA1[[2]]))
anova_E1_rFFA1
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 16 0.36 16.57 *** .141 <.001
## 2 Layout 2.44, 38.99 0.05 4.90 ** .017 .009
## 3 FaceWord:Layout 2.28, 36.41 0.06 2.55 + .009 .086
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E1_rFFA1 <- emmeans(anova_E1_rFFA1, ~ FaceWord * Layout)
emm_aov_E1_rFFA1 %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E1_rFFA1, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words 0.419 0.103 16 4.071 0.0009
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E1_rFFA1, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.15479 0.0496 48 3.123 0.0155
## intact - top 0.16431 0.0496 48 3.315 0.0092
## intact - bottom 0.14352 0.0496 48 2.895 0.0281
## exchange - top 0.00952 0.0496 48 0.192 0.9975
## exchange - bottom -0.01127 0.0496 48 -0.227 0.9958
## top - bottom -0.02079 0.0496 48 -0.419 0.9749
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E1_rFFA1 <- contrast(emm_aov_E1_rFFA1, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_anova_E1, interaction = "pairwise") # , adjust = "none"
contr_aov_E1_rFFA1
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words 0.5871 0.1208 28.9 4.858 <.0001
## exchange . faces - words 0.3178 0.1208 28.9 2.630 0.0135
## top . faces - words 0.3904 0.1208 28.9 3.230 0.0031
## bottom . faces - words 0.3822 0.1208 28.9 3.163 0.0037
## . faces intact - exchange 0.2894 0.0715 95.8 4.046 0.0001
## . faces intact - top 0.2627 0.0715 95.8 3.672 0.0004
## . faces intact - bottom 0.2459 0.0715 95.8 3.438 0.0009
## . faces exchange - top -0.0268 0.0715 95.8 -0.374 0.7091
## . faces exchange - bottom -0.0435 0.0715 95.8 -0.608 0.5448
## . faces top - bottom -0.0167 0.0715 95.8 -0.234 0.8158
## . words intact - exchange 0.0202 0.0715 95.8 0.282 0.7786
## . words intact - top 0.0660 0.0715 95.8 0.922 0.3587
## . words intact - bottom 0.0411 0.0715 95.8 0.574 0.5670
## . words exchange - top 0.0458 0.0715 95.8 0.640 0.5235
## . words exchange - bottom 0.0209 0.0715 95.8 0.293 0.7705
## . words top - bottom -0.0249 0.0715 95.8 -0.348 0.7288
anova_E1_rFFA1_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_FFA1,
Label == label_FFA1[[2]],
Layout %in% c("intact", "exchange")))
anova(anova_E1_rFFA1_ie, "pes")
contrast(emmeans(anova_E1_rFFA1_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words 0.452 0.0918 16 4.927 0.0002
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_rFFA1_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.155 0.0433 16 3.578 0.0025
##
## Results are averaged over the levels of: FaceWord
emm_E1_rFFA1_ie <- emmeans(anova_E1_rFFA1_ie, ~ FaceWord + Layout)
contrast(emm_E1_rFFA1_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words intact - exchange 0.269 0.115 16 2.344 0.0323
(simple_E1_rFFA1_ie <- pairs(emm_E1_rFFA1_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words 0.5871 0.1083 26.9 5.420 <.0001
## exchange . faces - words 0.3178 0.1083 26.9 2.934 0.0068
## . faces intact - exchange 0.2894 0.0719 29.7 4.025 0.0004
## . words intact - exchange 0.0202 0.0719 29.7 0.280 0.7811
2(face vs. word) \(\times\) 2(top vs. bottom) ANOVA
anova_E1_rFFA1_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_FFA1,
Label == label_FFA1[[2]],
Layout %in% c("top", "bottom")))
anova(anova_E1_rFFA1_tb, "pes")
contrast(emmeans(anova_E1_rFFA1_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words 0.386 0.122 16 3.157 0.0061
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_rFFA1_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## top - bottom -0.0208 0.05 16 -0.416 0.6829
##
## Results are averaged over the levels of: FaceWord
emm_E1_rFFA1_tb <- emmeans(anova_E1_rFFA1_tb, ~ FaceWord + Layout)
contrast(emm_E1_rFFA1_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words top - bottom 0.00817 0.1 16 0.082 0.9359
(simple_E1_rFFA1_tb <- pairs(emm_E1_rFFA1_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## top . faces - words 0.3904 0.1322 21.2 2.953 0.0075
## bottom . faces - words 0.3822 0.1322 21.2 2.891 0.0087
## . faces top - bottom -0.0167 0.0707 32.0 -0.236 0.8146
## . words top - bottom -0.0249 0.0707 32.0 -0.352 0.7272
anova_E1_rFFA1_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E1 %>%
filter(grepl("rh.f-vs-o.ffa1", Label)))
anova_E1_rFFA1_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 16 1.21 14.95 ** .146 .001
## 2 Layout 2.48, 39.66 0.16 4.97 ** .018 .008
## 3 Area 1.05, 16.78 0.20 11.69 ** .023 .003
## 4 FaceWord:Layout 2.42, 38.69 0.18 2.64 + .011 .074
## 5 FaceWord:Area 1.04, 16.69 0.05 24.42 *** .011 <.001
## 6 Layout:Area 2.27, 36.27 0.01 6.45 ** <.001 .003
## 7 FaceWord:Layout:Area 2.12, 33.93 0.01 2.08 <.001 .138
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E1_rFFA1_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## faces - words X50 0.491 0.0962 17.3 5.101 0.0001
## faces - words X100 0.412 0.0962 17.3 4.286 0.0005
## faces - words X200 0.308 0.0962 17.3 3.202 0.0051
## faces - words X300 0.248 0.0962 17.3 2.573 0.0196
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_rFFA1_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 0.178104 0.0448 51.4 3.972 0.0002
## intact - top X50 0.178542 0.0448 51.4 3.982 0.0002
## intact - bottom X50 0.173047 0.0448 51.4 3.859 0.0003
## exchange - top X50 0.000438 0.0448 51.4 0.010 0.9922
## exchange - bottom X50 -0.005057 0.0448 51.4 -0.113 0.9106
## top - bottom X50 -0.005495 0.0448 51.4 -0.123 0.9029
## intact - exchange X100 0.148650 0.0448 51.4 3.315 0.0017
## intact - top X100 0.159579 0.0448 51.4 3.559 0.0008
## intact - bottom X100 0.146329 0.0448 51.4 3.263 0.0020
## exchange - top X100 0.010929 0.0448 51.4 0.244 0.8084
## exchange - bottom X100 -0.002321 0.0448 51.4 -0.052 0.9589
## top - bottom X100 -0.013250 0.0448 51.4 -0.295 0.7688
## intact - exchange X200 0.110646 0.0448 51.4 2.468 0.0170
## intact - top X200 0.134227 0.0448 51.4 2.993 0.0042
## intact - bottom X200 0.118904 0.0448 51.4 2.652 0.0106
## exchange - top X200 0.023581 0.0448 51.4 0.526 0.6012
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E1_rFFA1_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange faces - words X50 0.283 0.0934 51.3 3.032 0.0038
## intact - exchange faces - words X100 0.263 0.0934 51.3 2.817 0.0069
## intact - exchange faces - words X200 0.226 0.0934 51.3 2.416 0.0193
## intact - exchange faces - words X300 0.194 0.0934 51.3 2.081 0.0424
contrast(emmeans(anova_E1_rFFA1_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange faces X50 0.31965 0.0647 103 4.938 <.0001
## intact - exchange words X50 0.03656 0.0647 103 0.565 0.5735
## intact - exchange faces X100 0.28016 0.0647 103 4.328 <.0001
## intact - exchange words X100 0.01714 0.0647 103 0.265 0.7917
## intact - exchange faces X200 0.22342 0.0647 103 3.452 0.0008
## intact - exchange words X200 -0.00213 0.0647 103 -0.033 0.9739
## intact - exchange faces X300 0.18547 0.0647 103 2.865 0.0051
## intact - exchange words X300 -0.00885 0.0647 103 -0.137 0.8915
# add the column of Hemisphere
nRow_E1 <-nrow(as.data.frame(emm_aov_E1_lFFA1))
Hemisphere <- c(rep("left", nRow_E1), rep("right", nRow_E1))
desp_uni_E1_FFA1 <- cbind(Hemisphere, rbind(as.data.frame(emm_aov_E1_lFFA1), as.data.frame(emm_aov_E1_rFFA1)))
plot_uni_E1_FFA1 <- plot_uni(desp_uni_E1_FFA1, contr_aov_E1_lFFA1, contr_aov_E1_rFFA1, "FFA1")
# ggsave('plot_uni_E1_FFA1.png', plot_uni_E1_FFA1, width = 10, height = 10)
plot_uni_E1_FFA1
The above figure shows the neural respones (beta values) in FFA1 for each condition. The numbers are the p-values for the tests of differences between intact vs. exchange in that condition. Error bars represent 95% confidence intervals. Note: “*p<0.1;**p<0.05;***p<0.01”
# add the column of Hemisphere
nRow_E1 <-nrow(as.data.frame(emm_E1_lFFA1_ie))
Hemisphere <- c(rep("left", nRow_E1), rep("right", nRow_E1))
desp_uni_E1_FFA1_ie <- cbind(Hemisphere, rbind(as.data.frame(emm_E1_lFFA1_ie), as.data.frame(emm_E1_rFFA1_ie)))
plot_uni_E1_FFA1_ie <- plot_uni(desp_uni_E1_FFA1_ie, simple_E1_lFFA1_ie, simple_E1_rFFA1_ie, "FFA1", F)
# ggsave('plot_uni_E1_FFA1_ie.png', plot_uni_E1_FFA1_ie, width = 10, height = 5)
plot_uni_E1_FFA1_ie
# add the column of Hemisphere
nRow_E1 <-nrow(as.data.frame(emm_E1_lFFA1_tb))
Hemisphere <- c(rep("left", nRow_E1), rep("right", nRow_E1))
desp_uni_E1_FFA1_tb <- cbind(Hemisphere, rbind(as.data.frame(emm_E1_lFFA1_tb), as.data.frame(emm_E1_rFFA1_tb)))
plot_uni_E1_FFA1_tb <- plot_uni(desp_uni_E1_FFA1_tb, simple_E1_lFFA1_tb, simple_E1_rFFA1_tb, "FFA1", F)
# ggsave('plot_uni_E1_FFA1_tb.png', plot_uni_E1_FFA1_tb, width = 10, height = 5)
plot_uni_E1_FFA1_tb
# one-sample for results of decode E1 FFA1
one_decode_agg_E1_FFA1 <- {
df_decode_E1_FFA1 %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1)) %>%
group_by(Hemisphere, ClassifyPair) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_agg_E1_FFA1
plot_decode_E1_FFA1 <- plot_decode(one_decode_agg_E1_FFA1, "FFA1")
# ggsave('plot_decode_E1_FFA1.png', plot_decode_E1_FFA1, width = 6.5, height = 16)
plot_decode_E1_FFA1
The above figure shows the decoding accuracy in FFA1 for each pair. The numbers are the p-values for the one-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals. Note: “*p<0.1;**p<0.05;***p<0.01”
# one-sample for results of decode E1 FFA1
one_decode_area_agg_E1_FFA1 <- {
df_decode_area_acc_E1 %>%
filter(grepl("f-vs-o.ffa1", Label)) %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1),
Area = as.numeric(str_extract(Label, "\\d*0"))) %>%
group_by(Hemisphere, ClassifyPair, Area) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_area_agg_E1_FFA1
lFFA1 word_intact vs. word_exchange is significantly above chance (300 mm^2).
rFFA1 face_intact vs. face_exchange is marginally (p = 0.05021) above chance (50 mm^2).
one_simi_E1_FFA1 <- {
df_simi_E1_FFA1 %>%
group_by(Hemisphere, Combination) %>%
summarize(mean = t.test(RateAsExchange, mu = 0.5)[[5]],
SE = t.test(RateAsExchange, mu = 0.5)[[7]],
cohens_d = (mean-0.5)/sd(RateAsExchange),
t = t.test(RateAsExchange, mu = 0.5)[[1]],
df = t.test(RateAsExchange, mu = 0.5)[[2]],
p = round(t.test(RateAsExchange, mu = 0.5)[[3]], 5),
lower.CL = t.test(RateAsExchange, mu = 0.5)[[4]][1],
upper.CL = t.test(RateAsExchange, mu = 0.5)[[4]][2],
nullValue = t.test(RateAsExchange, mu = 0.5)[[6]],
alternative = t.test(RateAsExchange, mu = 0.5)[[8]]
)
}
one_simi_E1_FFA1
plot_simi_E1_FFA1 <- plot_simi(one_simi_E1_FFA1, "FFA1")
# ggsave('plot_simi_E1_FFA1.png', plot_simi_E1_FFA1, width = 8, height = 10)
plot_simi_E1_FFA1
The above figure shows the probability of top+bottom being decoded as exchange conditions in FFA1. Patterns of top and bottom were combined with different weights, i.e., “face_top0.25-face_bottom0.75” denotes the linear combinations of face_top and face_bottom with the weights of 0.25/0.75. The numbers are the p-values for the two-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals.
# only keep data for these two labels
df_uni_E1_FFA2 <- filter(df_clean_uni_E1, Label %in% label_FFA2)
df_decode_E1_FFA2 <- filter(df_decode_acc_E1, Label %in% label_FFA2)
df_simi_E1_FFA2 <- filter(df_rate_simi_E1, Label %in% label_FFA2)
df_uni_E1_FFA2 %>%
select(Hemisphere, Label, SessCode) %>%
distinct() %>%
group_by(Hemisphere, Label) %>%
summarize(Count = n())
anova_E1_lFFA2 <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_FFA2, Label == label_FFA2[[1]]))
anova_E1_lFFA2
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 11 0.07 2.38 .011 .151
## 2 Layout 2.44, 26.83 0.02 7.23 ** .025 .002
## 3 FaceWord:Layout 2.37, 26.03 0.04 0.22 .001 .836
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E1_lFFA2 <- emmeans(anova_E1_lFFA2, ~ FaceWord * Layout)
emm_aov_E1_lFFA2 %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E1_lFFA2, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words 0.0848 0.055 11 1.543 0.1510
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E1_lFFA2, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.09005 0.038 33 2.370 0.1030
## intact - top 0.17686 0.038 33 4.654 0.0003
## intact - bottom 0.08279 0.038 33 2.179 0.1503
## exchange - top 0.08681 0.038 33 2.285 0.1223
## exchange - bottom -0.00726 0.038 33 -0.191 0.9975
## top - bottom -0.09408 0.038 33 -2.476 0.0826
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E1_lFFA2 <- contrast(emm_aov_E1_lFFA2, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_anova_E1, interaction = "pairwise") # , adjust = "none"
contr_aov_E1_lFFA2
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words 0.130923 0.0822 36.4 1.593 0.1197
## exchange . faces - words 0.070611 0.0822 36.4 0.859 0.3958
## top . faces - words 0.053261 0.0822 36.4 0.648 0.5209
## bottom . faces - words 0.084486 0.0822 36.4 1.028 0.3106
## . faces intact - exchange 0.120206 0.0627 61.7 1.917 0.0599
## . faces intact - top 0.215695 0.0627 61.7 3.440 0.0010
## . faces intact - bottom 0.106005 0.0627 61.7 1.691 0.0960
## . faces exchange - top 0.095489 0.0627 61.7 1.523 0.1329
## . faces exchange - bottom -0.014201 0.0627 61.7 -0.226 0.8216
## . faces top - bottom -0.109690 0.0627 61.7 -1.749 0.0852
## . words intact - exchange 0.059894 0.0627 61.7 0.955 0.3432
## . words intact - top 0.138033 0.0627 61.7 2.201 0.0315
## . words intact - bottom 0.059568 0.0627 61.7 0.950 0.3458
## . words exchange - top 0.078139 0.0627 61.7 1.246 0.2174
## . words exchange - bottom -0.000326 0.0627 61.7 -0.005 0.9959
## . words top - bottom -0.078465 0.0627 61.7 -1.251 0.2155
2(face vs. word) \(\times\) 2(intact vs. exchange) ANOVA
anova_E1_lFFA2_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_FFA2,
Label == label_FFA2[[1]],
Layout %in% c("intact", "exchange")))
anova(anova_E1_lFFA2_ie, "pes")
contrast(emmeans(anova_E1_lFFA2_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words 0.101 0.0753 11 1.338 0.2080
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_lFFA2_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.0901 0.0461 11 1.954 0.0765
##
## Results are averaged over the levels of: FaceWord
emm_E1_lFFA2_ie <- emmeans(anova_E1_lFFA2_ie, ~ FaceWord + Layout)
contrast(emm_E1_lFFA2_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words intact - exchange 0.0603 0.0867 11 0.696 0.5010
(simple_E1_lFFA2_ie <- pairs(emm_E1_lFFA2_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words 0.1309 0.0869 17.6 1.507 0.1497
## exchange . faces - words 0.0706 0.0869 17.6 0.813 0.4274
## . faces intact - exchange 0.1202 0.0633 21.9 1.900 0.0706
## . words intact - exchange 0.0599 0.0633 21.9 0.947 0.3540
2(face vs. word) \(\times\) 2(top vs. bottom) ANOVA
anova_E1_lFFA2_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_FFA2,
Label == label_FFA2[[1]],
Layout %in% c("top", "bottom")))
anova(anova_E1_lFFA2_tb, "pes")
contrast(emmeans(anova_E1_lFFA2_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words 0.0689 0.0569 11 1.210 0.2515
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_lFFA2_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## top - bottom -0.0941 0.0241 11 -3.904 0.0025
##
## Results are averaged over the levels of: FaceWord
emm_E1_lFFA2_tb <- emmeans(anova_E1_lFFA2_tb, ~ FaceWord + Layout)
contrast(emm_E1_lFFA2_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words top - bottom -0.0312 0.104 11 -0.300 0.7700
(simple_E1_lFFA2_tb <- pairs(emm_E1_lFFA2_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## top . faces - words 0.0533 0.0771 21.8 0.690 0.4972
## bottom . faces - words 0.0845 0.0771 21.8 1.095 0.2854
## . faces top - bottom -0.1097 0.0574 15.5 -1.911 0.0746
## . words top - bottom -0.0785 0.0574 15.5 -1.367 0.1911
anova_E1_lFFA2_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E1 %>%
filter(grepl("lh.f-vs-o.ffa2", Label)))
anova_E1_lFFA2_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 12 0.27 0.06 <.001 .817
## 2 Layout 2.28, 27.41 0.06 7.53 ** .016 .002
## 3 Area 1.04, 12.45 0.08 1.20 .002 .297
## 4 FaceWord:Layout 2.30, 27.58 0.13 0.41 .002 .695
## 5 FaceWord:Area 1.12, 13.43 0.02 23.85 *** .008 <.001
## 6 Layout:Area 3.09, 37.06 0.00 0.20 <.001 .899
## 7 FaceWord:Layout:Area 1.97, 23.64 0.00 1.06 <.001 .360
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E1_lFFA2_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## faces - words X50 0.1078 0.0525 13.9 2.055 0.0592
## faces - words X100 0.0429 0.0525 13.9 0.817 0.4278
## faces - words X200 -0.0333 0.0525 13.9 -0.635 0.5360
## faces - words X300 -0.0697 0.0525 13.9 -1.327 0.2058
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_lFFA2_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 0.05528 0.03 39.7 1.841 0.0731
## intact - top X50 0.14247 0.03 39.7 4.746 <.0001
## intact - bottom X50 0.06431 0.03 39.7 2.142 0.0384
## exchange - top X50 0.08719 0.03 39.7 2.904 0.0060
## exchange - bottom X50 0.00903 0.03 39.7 0.301 0.7651
## top - bottom X50 -0.07816 0.03 39.7 -2.604 0.0129
## intact - exchange X100 0.05570 0.03 39.7 1.855 0.0710
## intact - top X100 0.14025 0.03 39.7 4.672 <.0001
## intact - bottom X100 0.05988 0.03 39.7 1.995 0.0530
## exchange - top X100 0.08455 0.03 39.7 2.816 0.0075
## exchange - bottom X100 0.00418 0.03 39.7 0.139 0.8901
## top - bottom X100 -0.08037 0.03 39.7 -2.677 0.0107
## intact - exchange X200 0.04979 0.03 39.7 1.659 0.1051
## intact - top X200 0.13683 0.03 39.7 4.558 <.0001
## intact - bottom X200 0.05713 0.03 39.7 1.903 0.0643
## exchange - top X200 0.08704 0.03 39.7 2.899 0.0061
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E1_lFFA2_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange faces - words X50 0.1011 0.09 38.1 1.123 0.2686
## intact - exchange faces - words X100 0.0822 0.09 38.1 0.912 0.3673
## intact - exchange faces - words X200 0.0731 0.09 38.1 0.812 0.4217
## intact - exchange faces - words X300 0.0750 0.09 38.1 0.833 0.4098
contrast(emmeans(anova_E1_lFFA2_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange faces X50 0.10582 0.0541 66.8 1.956 0.0547
## intact - exchange words X50 0.00473 0.0541 66.8 0.087 0.9306
## intact - exchange faces X100 0.09678 0.0541 66.8 1.789 0.0782
## intact - exchange words X100 0.01462 0.0541 66.8 0.270 0.7878
## intact - exchange faces X200 0.08636 0.0541 66.8 1.596 0.1152
## intact - exchange words X200 0.01322 0.0541 66.8 0.244 0.8077
## intact - exchange faces X300 0.08504 0.0541 66.8 1.572 0.1208
## intact - exchange words X300 0.01000 0.0541 66.8 0.185 0.8539
anova_E1_rFFA2 <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_FFA2, Label == label_FFA2[[2]]))
anova_E1_rFFA2
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 12 0.19 9.67 ** .104 .009
## 2 Layout 2.49, 29.93 0.03 9.97 *** .039 <.001
## 3 FaceWord:Layout 2.25, 26.96 0.03 3.58 * .016 .037
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E1_rFFA2 <- emmeans(anova_E1_rFFA2, ~ FaceWord * Layout)
emm_aov_E1_rFFA2 %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E1_rFFA2, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words 0.269 0.0866 12 3.110 0.0090
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E1_rFFA2, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.19346 0.0409 36 4.725 0.0002
## intact - top 0.19129 0.0409 36 4.672 0.0002
## intact - bottom 0.15158 0.0409 36 3.702 0.0038
## exchange - top -0.00216 0.0409 36 -0.053 0.9999
## exchange - bottom -0.04188 0.0409 36 -1.023 0.7373
## top - bottom -0.03971 0.0409 36 -0.970 0.7672
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E1_rFFA2 <- contrast(emm_aov_E1_rFFA2, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_anova_E1, interaction = "pairwise") # , adjust = "none"
contr_aov_E1_rFFA2
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words 0.43226 0.1015 21.6 4.260 0.0003
## exchange . faces - words 0.16056 0.1015 21.6 1.582 0.1281
## top . faces - words 0.25139 0.1015 21.6 2.478 0.0215
## bottom . faces - words 0.23295 0.1015 21.6 2.296 0.0318
## . faces intact - exchange 0.32931 0.0595 71.8 5.533 <.0001
## . faces intact - top 0.28173 0.0595 71.8 4.734 <.0001
## . faces intact - bottom 0.25124 0.0595 71.8 4.221 0.0001
## . faces exchange - top -0.04758 0.0595 71.8 -0.799 0.4267
## . faces exchange - bottom -0.07807 0.0595 71.8 -1.312 0.1938
## . faces top - bottom -0.03049 0.0595 71.8 -0.512 0.6100
## . words intact - exchange 0.05761 0.0595 71.8 0.968 0.3363
## . words intact - top 0.10086 0.0595 71.8 1.695 0.0945
## . words intact - bottom 0.05192 0.0595 71.8 0.872 0.3859
## . words exchange - top 0.04325 0.0595 71.8 0.727 0.4698
## . words exchange - bottom -0.00569 0.0595 71.8 -0.096 0.9242
## . words top - bottom -0.04894 0.0595 71.8 -0.822 0.4136
anova_E1_rFFA2_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_FFA2,
Label == label_FFA2[[2]],
Layout %in% c("intact", "exchange")))
anova(anova_E1_rFFA2_ie, "pes")
contrast(emmeans(anova_E1_rFFA2_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words 0.296 0.0932 12 3.182 0.0079
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_rFFA2_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.193 0.0426 12 4.539 0.0007
##
## Results are averaged over the levels of: FaceWord
emm_E1_rFFA2_ie <- emmeans(anova_E1_rFFA2_ie, ~ FaceWord + Layout)
contrast(emm_E1_rFFA2_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words intact - exchange 0.272 0.0687 12 3.955 0.0019
(simple_E1_rFFA2_ie <- pairs(emm_E1_rFFA2_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words 0.4323 0.0993 15.2 4.354 0.0006
## exchange . faces - words 0.1606 0.0993 15.2 1.617 0.1264
## . faces intact - exchange 0.3293 0.0547 23.0 6.016 <.0001
## . words intact - exchange 0.0576 0.0547 23.0 1.052 0.3036
2(face vs. word) \(\times\) 2(top vs. bottom) ANOVA
anova_E1_rFFA2_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_FFA2,
Label == label_FFA2[[2]],
Layout %in% c("top", "bottom")))
anova(anova_E1_rFFA2_tb, "pes")
contrast(emmeans(anova_E1_rFFA2_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words 0.242 0.0892 12 2.715 0.0188
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_rFFA2_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## top - bottom -0.0397 0.0323 12 -1.229 0.2426
##
## Results are averaged over the levels of: FaceWord
emm_E1_rFFA2_tb <- emmeans(anova_E1_rFFA2_tb, ~ FaceWord + Layout)
contrast(emm_E1_rFFA2_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words top - bottom 0.0184 0.105 12 0.175 0.8641
(simple_E1_rFFA2_tb <- pairs(emm_E1_rFFA2_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## top . faces - words 0.2514 0.1036 19.5 2.427 0.0251
## bottom . faces - words 0.2329 0.1036 19.5 2.249 0.0363
## . faces top - bottom -0.0305 0.0618 19.9 -0.493 0.6273
## . words top - bottom -0.0489 0.0618 19.9 -0.791 0.4381
anova_E1_rFFA2_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E1 %>%
filter(grepl("rh.f-vs-o.ffa2", Label)))
anova_E1_rFFA2_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 13 0.48 12.77 ** .083 .003
## 2 Layout 2.51, 32.66 0.10 8.50 *** .030 <.001
## 3 Area 1.07, 13.87 0.13 4.58 * .010 .049
## 4 FaceWord:Layout 1.88, 24.38 0.14 2.65 + .010 .094
## 5 FaceWord:Area 1.04, 13.46 0.03 14.28 ** .007 .002
## 6 Layout:Area 2.57, 33.46 0.00 4.69 * <.001 .010
## 7 FaceWord:Layout:Area 1.72, 22.41 0.01 0.97 <.001 .382
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E1_rFFA2_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## faces - words X50 0.320 0.0673 14.8 4.757 0.0003
## faces - words X100 0.264 0.0673 14.8 3.922 0.0014
## faces - words X200 0.192 0.0673 14.8 2.856 0.0122
## faces - words X300 0.155 0.0673 14.8 2.297 0.0366
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_rFFA2_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 0.20089 0.0392 42.3 5.128 <.0001
## intact - top X50 0.19393 0.0392 42.3 4.951 <.0001
## intact - bottom X50 0.13980 0.0392 42.3 3.569 0.0009
## exchange - top X50 -0.00696 0.0392 42.3 -0.178 0.8598
## exchange - bottom X50 -0.06109 0.0392 42.3 -1.559 0.1263
## top - bottom X50 -0.05413 0.0392 42.3 -1.382 0.1743
## intact - exchange X100 0.18113 0.0392 42.3 4.624 <.0001
## intact - top X100 0.18428 0.0392 42.3 4.704 <.0001
## intact - bottom X100 0.13269 0.0392 42.3 3.387 0.0015
## exchange - top X100 0.00315 0.0392 42.3 0.080 0.9363
## exchange - bottom X100 -0.04843 0.0392 42.3 -1.236 0.2231
## top - bottom X100 -0.05158 0.0392 42.3 -1.317 0.1950
## intact - exchange X200 0.14991 0.0392 42.3 3.827 0.0004
## intact - top X200 0.16100 0.0392 42.3 4.110 0.0002
## intact - bottom X200 0.11614 0.0392 42.3 2.965 0.0050
## exchange - top X200 0.01109 0.0392 42.3 0.283 0.7784
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E1_rFFA2_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange faces - words X50 0.243 0.081 42.4 2.998 0.0045
## intact - exchange faces - words X100 0.231 0.081 42.4 2.848 0.0068
## intact - exchange faces - words X200 0.195 0.081 42.4 2.412 0.0203
## intact - exchange faces - words X300 0.185 0.081 42.4 2.280 0.0277
contrast(emmeans(anova_E1_rFFA2_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange faces X50 0.3223 0.0563 84.7 5.720 <.0001
## intact - exchange words X50 0.0795 0.0563 84.7 1.411 0.1620
## intact - exchange faces X100 0.2965 0.0563 84.7 5.262 <.0001
## intact - exchange words X100 0.0658 0.0563 84.7 1.168 0.2462
## intact - exchange faces X200 0.2476 0.0563 84.7 4.394 <.0001
## intact - exchange words X200 0.0522 0.0563 84.7 0.927 0.3564
## intact - exchange faces X300 0.2194 0.0563 84.7 3.895 0.0002
## intact - exchange words X300 0.0348 0.0563 84.7 0.618 0.5385
# add the column of Hemisphere
nRow_E1 <-nrow(as.data.frame(emm_aov_E1_lFFA2))
Hemisphere <- c(rep("left", nRow_E1), rep("right", nRow_E1))
desp_uni_E1_FFA2 <- cbind(Hemisphere, rbind(as.data.frame(emm_aov_E1_lFFA2), as.data.frame(emm_aov_E1_rFFA2)))
plot_uni_E1_FFA2 <- plot_uni(desp_uni_E1_FFA2, contr_aov_E1_lFFA2, contr_aov_E1_rFFA2, "FFA2")
# ggsave('plot_uni_E1_FFA2.png', plot_uni_E1_FFA2, width = 10, height = 10)
plot_uni_E1_FFA2
The above figure shows the neural respones (beta values) in FFA2 for each condition. The numbers are the p-values for the tests of differences between intact vs. exchange in that condition. Error bars represent 95% confidence intervals. Note: “*p<0.1;**p<0.05;***p<0.01”
# add the column of Hemisphere
nRow_E1 <-nrow(as.data.frame(emm_E1_lFFA2_ie))
Hemisphere <- c(rep("left", nRow_E1), rep("right", nRow_E1))
desp_uni_E1_FFA2_ie <- cbind(Hemisphere, rbind(as.data.frame(emm_E1_lFFA2_ie), as.data.frame(emm_E1_rFFA2_ie)))
plot_uni_E1_FFA2_ie <- plot_uni(desp_uni_E1_FFA2_ie, simple_E1_lFFA2_ie, simple_E1_rFFA2_ie, "FFA2", F)
# ggsave('plot_uni_E1_FFA2_ie.png', plot_uni_E1_FFA2_ie, width = 10, height = 5)
plot_uni_E1_FFA2_ie
# add the column of Hemisphere
nRow_E1 <-nrow(as.data.frame(emm_E1_lFFA2_tb))
Hemisphere <- c(rep("left", nRow_E1), rep("right", nRow_E1))
desp_uni_E1_FFA2_tb <- cbind(Hemisphere, rbind(as.data.frame(emm_E1_lFFA2_tb), as.data.frame(emm_E1_rFFA2_tb)))
plot_uni_E1_FFA2_tb <- plot_uni(desp_uni_E1_FFA2_tb, simple_E1_lFFA2_tb, simple_E1_rFFA2_tb, "FFA2", F)
# ggsave('plot_uni_E1_FFA2_tb.png', plot_uni_E1_FFA2_tb, width = 10, height = 5)
plot_uni_E1_FFA2_tb
# one-sample for results of decode E1 FFA2
one_decode_agg_E1_FFA2 <- {
df_decode_E1_FFA2 %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1)) %>%
group_by(Hemisphere, ClassifyPair) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_agg_E1_FFA2
plot_decode_E1_FFA2 <- plot_decode(one_decode_agg_E1_FFA2, "FFA2")
# ggsave('plot_decode_E1_FFA2.png', plot_decode_E1_FFA2, width = 6.5, height = 16)
plot_decode_E1_FFA2
The above figure shows the decoding accuracy in FFA2 for each pair. The numbers are the p-values for the one-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals. Note: “*p<0.1;**p<0.05;***p<0.01”
# one-sample for results of decode E1 FFA2
one_decode_area_agg_E1_FFA2<- {
df_decode_area_acc_E1 %>%
filter(grepl("f-vs-o.ffa2", Label)) %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1),
Area = as.numeric(str_extract(Label, "\\d*0"))) %>%
group_by(Hemisphere, ClassifyPair, Area) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_area_agg_E1_FFA2
lFFA2: face intact vs. face exchanged above chance (200 and 300) rFFA2: face intact vs. face exchanged “marginally” above chance (>0.068; one-sided)
# Similarity of top + bottom to intact vs. exchange in FFA
one_simi_E1_FFA2 <- {
df_simi_E1_FFA2 %>%
group_by(Hemisphere, Combination) %>%
summarize(mean = t.test(RateAsExchange, mu = 0.5)[[5]],
SE = t.test(RateAsExchange, mu = 0.5)[[7]],
cohens_d = (mean-0.5)/sd(RateAsExchange),
t = t.test(RateAsExchange, mu = 0.5)[[1]],
df = t.test(RateAsExchange, mu = 0.5)[[2]],
p = round(t.test(RateAsExchange, mu = 0.5)[[3]], 5),
lower.CL = t.test(RateAsExchange, mu = 0.5)[[4]][1],
upper.CL = t.test(RateAsExchange, mu = 0.5)[[4]][2],
nullValue = t.test(RateAsExchange, mu = 0.5)[[6]],
alternative = t.test(RateAsExchange, mu = 0.5)[[8]]
)
}
one_simi_E1_FFA2
plot_simi_E1_FFA2 <- plot_simi(one_simi_E1_FFA2, "FFA2")
# ggsave('plot_simi_E1_FFA2.png', plot_simi_E1_FFA2, width = 8, height = 10)
plot_simi_E1_FFA2
The above figure shows the probability of top+bottom being decoded as exchange conditions in FFA2. Patterns of top and bottom were combined with different weights, i.e., “face_top0.25-face_bottom0.75” denotes the linear combinations of face_top and face_bottom with the weights of 0.25/0.75. The numbers are the p-values for the two-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals.
# only keep data for these two labels
df_uni_E1_VWFA <- filter(df_clean_uni_E1, Label %in% label_VWFA)
df_decode_E1_VWFA <- filter(df_decode_acc_E1, Label %in% label_VWFA)
df_simi_E1_VWFA <- filter(df_rate_simi_E1, Label %in% label_VWFA)
# subjects used for each hemisphere
# unique(as.character((df_univar_agg_E1_VWFA %>% filter(Label == label_VWFA_E1))$SubjCode))
df_uni_E1_VWFA %>%
select(Hemisphere, Label, SessCode) %>%
distinct() %>%
group_by(Hemisphere, Label) %>%
summarize(Count = n())
anova_E1_VWFA <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_VWFA, Label == label_VWFA))
anova_E1_VWFA
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 17 0.21 101.99 *** .261 <.001
## 2 Layout 2.62, 44.47 0.03 4.17 * .005 .014
## 3 FaceWord:Layout 2.64, 44.92 0.02 6.13 ** .006 .002
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E1_VWFA <- emmeans(anova_E1_VWFA, ~ FaceWord * Layout)
emm_aov_E1_VWFA %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E1_VWFA, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words -0.773 0.0765 17 -10.099 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E1_VWFA, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange -0.0550 0.0375 51 -1.465 0.4655
## intact - top 0.0766 0.0375 51 2.041 0.1869
## intact - bottom 0.0174 0.0375 51 0.464 0.9665
## exchange - top 0.1316 0.0375 51 3.506 0.0051
## exchange - bottom 0.0724 0.0375 51 1.930 0.2287
## top - bottom -0.0592 0.0375 51 -1.576 0.4010
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E1_VWFA <- contrast(emm_aov_E1_VWFA, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_aov_E1, interaction = "pairwise") # , adjust = "none"
contr_aov_E1_VWFA
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words -0.69655 0.0866 27.2 -8.044 <.0001
## exchange . faces - words -0.90265 0.0866 27.2 -10.425 <.0001
## top . faces - words -0.65610 0.0866 27.2 -7.577 <.0001
## bottom . faces - words -0.83587 0.0866 27.2 -9.653 <.0001
## . faces intact - exchange 0.04805 0.0500 100.4 0.960 0.3392
## . faces intact - top 0.05638 0.0500 100.4 1.127 0.2625
## . faces intact - bottom 0.08708 0.0500 100.4 1.740 0.0848
## . faces exchange - top 0.00833 0.0500 100.4 0.166 0.8681
## . faces exchange - bottom 0.03904 0.0500 100.4 0.780 0.4371
## . faces top - bottom 0.03071 0.0500 100.4 0.614 0.5408
## . words intact - exchange -0.15806 0.0500 100.4 -3.159 0.0021
## . words intact - top 0.09682 0.0500 100.4 1.935 0.0558
## . words intact - bottom -0.05223 0.0500 100.4 -1.044 0.2990
## . words exchange - top 0.25488 0.0500 100.4 5.094 <.0001
## . words exchange - bottom 0.10583 0.0500 100.4 2.115 0.0369
## . words top - bottom -0.14905 0.0500 100.4 -2.979 0.0036
2(face vs. word) \(\times\) 2(intact vs. exchange) ANOVA
anova_E1_VWFA_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_VWFA,
Label == label_VWFA[[1]],
Layout %in% c("intact", "exchange")))
anova(anova_E1_VWFA_ie, "pes")
contrast(emmeans(anova_E1_VWFA_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words -0.8 0.0834 17 -9.588 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_VWFA_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange -0.055 0.0276 17 -1.990 0.0629
##
## Results are averaged over the levels of: FaceWord
emm_E1_VWFA_ie <- emmeans(anova_E1_VWFA_ie, ~ FaceWord + Layout)
contrast(emm_E1_VWFA_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words intact - exchange 0.206 0.0551 17 3.743 0.0016
(simple_E1_VWFA_ie <- pairs(emm_E1_VWFA_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words -0.697 0.0878 20.7 -7.931 <.0001
## exchange . faces - words -0.903 0.0878 20.7 -10.278 <.0001
## . faces intact - exchange 0.048 0.0390 34.0 1.232 0.2266
## . words intact - exchange -0.158 0.0390 34.0 -4.052 0.0003
2(face vs. word) \(\times\) 2(top vs. bottom) ANOVA
anova_E1_VWFA_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_VWFA,
Label == label_VWFA[[1]],
Layout %in% c("top", "bottom")))
anova(anova_E1_VWFA_tb, "pes")
contrast(emmeans(anova_E1_VWFA_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words -0.746 0.0776 17 -9.608 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_VWFA_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## top - bottom -0.0592 0.0391 17 -1.515 0.1481
##
## Results are averaged over the levels of: FaceWord
emm_E1_VWFA_tb <- emmeans(anova_E1_VWFA_tb, ~ FaceWord + Layout)
contrast(emm_E1_VWFA_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words top - bottom 0.18 0.0708 17 2.539 0.0212
(simple_E1_VWFA_tb <- pairs(emm_E1_VWFA_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## top . faces - words -0.6561 0.0853 23.8 -7.689 <.0001
## bottom . faces - words -0.8359 0.0853 23.8 -9.796 <.0001
## . faces top - bottom 0.0307 0.0527 33.7 0.583 0.5640
## . words top - bottom -0.1491 0.0527 33.7 -2.828 0.0078
anova_E1_VWFA_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E1 %>%
filter(grepl("lh.word-vs-face-object-scrambled", Label)))
anova_E1_VWFA_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 17 0.76 77.99 *** .232 <.001
## 2 Layout 2.59, 44.06 0.10 4.60 ** .006 .009
## 3 Area 1.04, 17.72 0.23 3.65 + .004 .071
## 4 FaceWord:Layout 2.68, 45.61 0.07 6.47 ** .007 .001
## 5 FaceWord:Area 1.05, 17.93 0.06 33.32 *** .010 <.001
## 6 Layout:Area 2.71, 46.10 0.00 4.04 * <.001 .015
## 7 FaceWord:Layout:Area 2.62, 44.60 0.00 4.55 ** <.001 .010
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E1_VWFA_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## faces - words X50 -0.799 0.0756 19.9 -10.578 <.0001
## faces - words X100 -0.707 0.0756 19.9 -9.360 <.0001
## faces - words X200 -0.572 0.0756 19.9 -7.564 <.0001
## faces - words X300 -0.488 0.0756 19.9 -6.461 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_VWFA_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 -0.0583 0.0348 54.7 -1.672 0.1002
## intact - top X50 0.0919 0.0348 54.7 2.639 0.0108
## intact - bottom X50 0.0373 0.0348 54.7 1.070 0.2895
## exchange - top X50 0.1502 0.0348 54.7 4.311 0.0001
## exchange - bottom X50 0.0955 0.0348 54.7 2.742 0.0082
## top - bottom X50 -0.0547 0.0348 54.7 -1.569 0.1224
## intact - exchange X100 -0.0474 0.0348 54.7 -1.361 0.1792
## intact - top X100 0.0860 0.0348 54.7 2.468 0.0167
## intact - bottom X100 0.0301 0.0348 54.7 0.865 0.3910
## exchange - top X100 0.1334 0.0348 54.7 3.829 0.0003
## exchange - bottom X100 0.0775 0.0348 54.7 2.225 0.0302
## top - bottom X100 -0.0559 0.0348 54.7 -1.604 0.1146
## intact - exchange X200 -0.0304 0.0348 54.7 -0.873 0.3867
## intact - top X200 0.0807 0.0348 54.7 2.316 0.0244
## intact - bottom X200 0.0288 0.0348 54.7 0.828 0.4114
## exchange - top X200 0.1111 0.0348 54.7 3.188 0.0024
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E1_VWFA_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange faces - words X50 0.230 0.0616 54.6 3.730 0.0005
## intact - exchange faces - words X100 0.213 0.0616 54.6 3.462 0.0010
## intact - exchange faces - words X200 0.192 0.0616 54.6 3.109 0.0030
## intact - exchange faces - words X300 0.175 0.0616 54.6 2.844 0.0063
contrast(emmeans(anova_E1_VWFA_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange faces X50 0.0567 0.0465 108 1.219 0.2254
## intact - exchange words X50 -0.1732 0.0465 108 -3.724 0.0003
## intact - exchange faces X100 0.0593 0.0465 108 1.275 0.2050
## intact - exchange words X100 -0.1541 0.0465 108 -3.314 0.0013
## intact - exchange faces X200 0.0654 0.0465 108 1.407 0.1624
## intact - exchange words X200 -0.1262 0.0465 108 -2.714 0.0078
## intact - exchange faces X300 0.0676 0.0465 108 1.453 0.1491
## intact - exchange words X300 -0.1077 0.0465 108 -2.316 0.0225
nRow_E1 <-nrow(as.data.frame(emm_aov_E1_VWFA))
Hemisphere <- c(rep("left", nRow_E1))
desp_uni_E1_VWFA <- cbind(Hemisphere, as.data.frame(emm_aov_E1_VWFA))
plot_uni_E1_VWFA <- plot_uni_vwfa(desp_uni_E1_VWFA, contr_aov_E1_VWFA, "VWFA")
# ggsave('plot_uni_E1_VWFA.png', plot_uni_E1_VWFA, width = 5.5, height = 10)
plot_uni_E1_VWFA
The above figure shows the neural respones (beta values) in VWFA for each condition. The numbers are the p-values for the tests of differences between intact vs. exchange in that condition. Error bars represent 95% confidence intervals. Note: *, p < .05
nRow_E1 <-nrow(as.data.frame(emm_E1_VWFA_ie))
Hemisphere <- c(rep("left", nRow_E1))
desp_uni_E1_VWFA_ie <- cbind(Hemisphere, as.data.frame(emm_E1_VWFA_ie))
plot_uni_E1_VWFA_ie <- plot_uni_vwfa(desp_uni_E1_VWFA_ie, simple_E1_VWFA_ie, "VWFA", FALSE)
# ggsave('plot_uni_E1_VWFA_ie.png', plot_uni_E1_VWFA_ie, width = 5.5, height = 10)
plot_uni_E1_VWFA_ie
nRow_E1 <-nrow(as.data.frame(emm_E1_VWFA_tb))
Hemisphere <- c(rep("left", nRow_E1))
desp_uni_E1_VWFA_tb <- cbind(Hemisphere, as.data.frame(emm_E1_VWFA_tb))
plot_uni_E1_VWFA_tb <- plot_uni_vwfa(desp_uni_E1_VWFA_tb, simple_E1_VWFA_tb, "VWFA", FALSE)
# ggsave('plot_uni_E1_VWFA_tb.png', plot_uni_E1_VWFA_tb, width = 5.5, height = 10)
plot_uni_E1_VWFA_tb
# one-sample for results of decode E1 VWFA
one_decode_agg_E1_VWFA <- {
df_decode_E1_VWFA %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1)) %>%
group_by(Hemisphere, ClassifyPair) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_agg_E1_VWFA
plot_decode_E1_VWFA <- plot_decode_vwfa(one_decode_agg_E1_VWFA, "VWFA")
# ggsave('plot_decode_E1_VWFA.png', plot_decode_E1_VWFA, width = 4, height = 16)
plot_decode_E1_VWFA
The above figure shows the decoding accuracy in VWFA for each pair. The numbers are the p-values for the one-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals. Note: ***, p <.001
# one-sample for results of decode E1 VWFA
one_decode_area_agg_E1_VWFA<- {
df_decode_area_acc_E1 %>%
filter(grepl("lh.word-vs-face-object-scrambled", Label)) %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1),
Area = as.numeric(str_extract(Label, "\\d*0"))) %>%
group_by(Hemisphere, ClassifyPair, Area) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_area_agg_E1_VWFA
VWFA: word_intact vs. word_exchange significant above chance (100, 300mm^2).
# Similarity of top + bottom to intact vs. exchange in VWFA
one_simi_E1_VWFA <- {
df_simi_E1_VWFA %>%
group_by(Hemisphere, Combination) %>%
summarize(mean = t.test(RateAsExchange, mu = 0.5)[[5]],
SE = t.test(RateAsExchange, mu = 0.5)[[7]],
cohens_d = (mean-0.5)/sd(RateAsExchange),
t = t.test(RateAsExchange, mu = 0.5)[[1]],
df = t.test(RateAsExchange, mu = 0.5)[[2]],
p = round(t.test(RateAsExchange, mu = 0.5)[[3]], 5),
lower.CL = t.test(RateAsExchange, mu = 0.5)[[4]][1],
upper.CL = t.test(RateAsExchange, mu = 0.5)[[4]][2],
nullValue = t.test(RateAsExchange, mu = 0.5)[[6]],
alternative = t.test(RateAsExchange, mu = 0.5)[[8]]
)
}
one_simi_E1_VWFA
plot_simi_E1_VWFA <- plot_simi_vwfa(one_simi_E1_VWFA, "VWFA")
# ggsave('plot_simi_E1_VWFA.png', plot_simi_E1_VWFA, width = 4.25, height = 10)
plot_simi_E1_VWFA
The above figure shows the probability of top+bottom being decoded as exchange conditions in VWFA. Patterns of top and bottom were combined with different weights, i.e., “face_top0.25-face_bottom0.75” denotes the linear combinations of face_top and face_bottom with the weights of 0.25/0.75. The numbers are the p-values for the two-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals.
# only keep data for these two labels
df_uni_E1_LO <- filter(df_clean_uni_E1, Label %in% label_LO)
df_decode_E1_LO <- filter(df_decode_acc_E1, Label %in% label_LO)
df_simi_E1_LO <- filter(df_rate_simi_E1, Label %in% label_LO)
df_uni_E1_LO %>%
select(Hemisphere, Label, SessCode) %>%
distinct() %>%
group_by(Hemisphere, Label) %>%
summarize(Count = n())
anova_E1_lLO <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_LO, Label == label_LO[[1]]))
anova_E1_lLO
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 18 0.21 23.83 *** .060 <.001
## 2 Layout 2.27, 40.95 0.05 3.42 * .005 .037
## 3 FaceWord:Layout 2.45, 44.12 0.03 0.46 <.001 .670
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E1_lLO <- emmeans(anova_E1_lLO, ~ FaceWord * Layout)
emm_aov_E1_lLO %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E1_lLO, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words -0.366 0.0749 18 -4.882 0.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E1_lLO, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.00901 0.0433 54 0.208 0.9968
## intact - top 0.12389 0.0433 54 2.864 0.0295
## intact - bottom 0.05298 0.0433 54 1.225 0.6141
## exchange - top 0.11488 0.0433 54 2.655 0.0495
## exchange - bottom 0.04397 0.0433 54 1.016 0.7406
## top - bottom -0.07091 0.0433 54 -1.639 0.3659
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E1_lLO <- contrast(emm_aov_E1_lLO, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_aov_E1, interaction = "pairwise") # , adjust = "none"
contr_aov_E1_lLO
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words -0.33063 0.0873 31.8 -3.786 0.0006
## exchange . faces - words -0.34607 0.0873 31.8 -3.963 0.0004
## top . faces - words -0.37604 0.0873 31.8 -4.306 0.0001
## bottom . faces - words -0.41056 0.0873 31.8 -4.701 <.0001
## . faces intact - exchange 0.01672 0.0567 105.1 0.295 0.7685
## . faces intact - top 0.14659 0.0567 105.1 2.586 0.0111
## . faces intact - bottom 0.09294 0.0567 105.1 1.640 0.1040
## . faces exchange - top 0.12986 0.0567 105.1 2.291 0.0239
## . faces exchange - bottom 0.07622 0.0567 105.1 1.345 0.1816
## . faces top - bottom -0.05364 0.0567 105.1 -0.947 0.3461
## . words intact - exchange 0.00129 0.0567 105.1 0.023 0.9819
## . words intact - top 0.10118 0.0567 105.1 1.785 0.0771
## . words intact - bottom 0.01302 0.0567 105.1 0.230 0.8188
## . words exchange - top 0.09989 0.0567 105.1 1.763 0.0809
## . words exchange - bottom 0.01173 0.0567 105.1 0.207 0.8365
## . words top - bottom -0.08817 0.0567 105.1 -1.556 0.1228
2(face vs. word) \(\times\) 2(intact vs. exchange) ANOVA
anova_E1_lLO_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_LO,
Label == label_LO[[1]],
Layout %in% c("intact", "exchange")))
anova(anova_E1_lLO_ie, "pes")
contrast(emmeans(anova_E1_lLO_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words -0.338 0.0908 18 -3.727 0.0015
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_lLO_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.00901 0.0354 18 0.254 0.8022
##
## Results are averaged over the levels of: FaceWord
emm_E1_lLO_ie <- emmeans(anova_E1_lLO_ie, ~ FaceWord + Layout)
contrast(emm_E1_lLO_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words intact - exchange 0.0154 0.0594 18 0.260 0.7978
(simple_E1_lLO_ie <- pairs(emm_E1_lLO_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words -0.33063 0.0955 21.8 -3.461 0.0022
## exchange . faces - words -0.34607 0.0955 21.8 -3.623 0.0015
## . faces intact - exchange 0.01672 0.0462 34.9 0.362 0.7196
## . words intact - exchange 0.00129 0.0462 34.9 0.028 0.9779
2(face vs. word) \(\times\) 2(top vs. bottom) ANOVA
anova_E1_lLO_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_LO,
Label == label_LO[[1]],
Layout %in% c("top", "bottom")))
anova(anova_E1_lLO_tb, "pes")
contrast(emmeans(anova_E1_lLO_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words -0.393 0.0722 18 -5.449 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_lLO_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## top - bottom -0.0709 0.0442 18 -1.602 0.1265
##
## Results are averaged over the levels of: FaceWord
emm_E1_lLO_tb <- emmeans(anova_E1_lLO_tb, ~ FaceWord + Layout)
contrast(emm_E1_lLO_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words top - bottom 0.0345 0.0606 18 0.570 0.5757
(simple_E1_lLO_tb <- pairs(emm_E1_lLO_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## top . faces - words -0.3760 0.0783 24.1 -4.804 0.0001
## bottom . faces - words -0.4106 0.0783 24.1 -5.245 <.0001
## . faces top - bottom -0.0536 0.0536 31.8 -1.001 0.3246
## . words top - bottom -0.0882 0.0536 31.8 -1.644 0.1100
anova_E1_lLO_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E1 %>%
filter(grepl("lh.o-vs-scr", Label)))
anova_E1_lLO_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 18 0.89 20.82 *** .069 <.001
## 2 Layout 2.48, 44.58 0.17 4.66 ** .008 .010
## 3 Area 1.04, 18.68 0.37 2.15 .003 .159
## 4 FaceWord:Layout 2.43, 43.69 0.12 0.16 <.001 .886
## 5 FaceWord:Area 1.06, 19.04 0.03 3.12 + <.001 .091
## 6 Layout:Area 2.95, 53.12 0.00 0.68 <.001 .565
## 7 FaceWord:Layout:Area 2.84, 51.20 0.00 1.05 <.001 .375
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E1_lLO_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## faces - words X50 -0.387 0.0782 19.4 -4.946 0.0001
## faces - words X100 -0.363 0.0782 19.4 -4.644 0.0002
## faces - words X200 -0.331 0.0782 19.4 -4.238 0.0004
## faces - words X300 -0.319 0.0782 19.4 -4.085 0.0006
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_lLO_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 0.00115 0.043 56.2 0.027 0.9787
## intact - top X50 0.13242 0.043 56.2 3.081 0.0032
## intact - bottom X50 0.04853 0.043 56.2 1.129 0.2637
## exchange - top X50 0.13127 0.043 56.2 3.054 0.0034
## exchange - bottom X50 0.04737 0.043 56.2 1.102 0.2751
## top - bottom X50 -0.08389 0.043 56.2 -1.952 0.0559
## intact - exchange X100 -0.00242 0.043 56.2 -0.056 0.9553
## intact - top X100 0.13994 0.043 56.2 3.256 0.0019
## intact - bottom X100 0.05136 0.043 56.2 1.195 0.2371
## exchange - top X100 0.14236 0.043 56.2 3.312 0.0016
## exchange - bottom X100 0.05378 0.043 56.2 1.251 0.2160
## top - bottom X100 -0.08858 0.043 56.2 -2.061 0.0440
## intact - exchange X200 -0.00630 0.043 56.2 -0.147 0.8840
## intact - top X200 0.13730 0.043 56.2 3.194 0.0023
## intact - bottom X200 0.05592 0.043 56.2 1.301 0.1985
## exchange - top X200 0.14360 0.043 56.2 3.341 0.0015
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E1_lLO_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange faces - words X50 0.00334 0.0725 56.5 0.046 0.9634
## intact - exchange faces - words X100 0.01430 0.0725 56.5 0.197 0.8443
## intact - exchange faces - words X200 0.02400 0.0725 56.5 0.331 0.7418
## intact - exchange faces - words X300 0.02942 0.0725 56.5 0.406 0.6863
contrast(emmeans(anova_E1_lLO_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange faces X50 0.00282 0.0562 110 0.050 0.9600
## intact - exchange words X50 -0.00052 0.0562 110 -0.009 0.9926
## intact - exchange faces X100 0.00473 0.0562 110 0.084 0.9331
## intact - exchange words X100 -0.00957 0.0562 110 -0.170 0.8651
## intact - exchange faces X200 0.00570 0.0562 110 0.101 0.9195
## intact - exchange words X200 -0.01830 0.0562 110 -0.326 0.7454
## intact - exchange faces X300 0.00281 0.0562 110 0.050 0.9603
## intact - exchange words X300 -0.02661 0.0562 110 -0.473 0.6369
aov_E1_rLO <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_LO, Label == label_LO[[2]]))
aov_E1_rLO
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 17 0.20 9.40 ** .019 .007
## 2 Layout 2.20, 37.35 0.07 1.39 .002 .261
## 3 FaceWord:Layout 2.76, 46.96 0.03 1.63 .001 .199
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E1_rLO <- emmeans(aov_E1_rLO, ~ FaceWord * Layout)
emm_aov_E1_rLO %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E1_rLO, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words -0.226 0.0737 17 -3.065 0.0070
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E1_rLO, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.0872 0.055 51 1.586 0.3957
## intact - top 0.1034 0.055 51 1.879 0.2497
## intact - bottom 0.0496 0.055 51 0.901 0.8041
## exchange - top 0.0162 0.055 51 0.294 0.9911
## exchange - bottom -0.0376 0.055 51 -0.684 0.9026
## top - bottom -0.0538 0.055 51 -0.978 0.7626
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E1_rLO <- contrast(emm_aov_E1_rLO, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_aov_E1, interaction = "pairwise") # , adjust = "none"
contr_aov_E1_rLO
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words -0.139667 0.0884 33.1 -1.580 0.1236
## exchange . faces - words -0.314757 0.0884 33.1 -3.560 0.0011
## top . faces - words -0.234501 0.0884 33.1 -2.653 0.0122
## bottom . faces - words -0.214267 0.0884 33.1 -2.424 0.0210
## . faces intact - exchange 0.174783 0.0680 93.0 2.572 0.0117
## . faces intact - top 0.150806 0.0680 93.0 2.219 0.0289
## . faces intact - bottom 0.086894 0.0680 93.0 1.279 0.2042
## . faces exchange - top -0.023978 0.0680 93.0 -0.353 0.7250
## . faces exchange - bottom -0.087889 0.0680 93.0 -1.293 0.1992
## . faces top - bottom -0.063911 0.0680 93.0 -0.940 0.3495
## . words intact - exchange -0.000307 0.0680 93.0 -0.005 0.9964
## . words intact - top 0.055972 0.0680 93.0 0.824 0.4123
## . words intact - bottom 0.012294 0.0680 93.0 0.181 0.8568
## . words exchange - top 0.056278 0.0680 93.0 0.828 0.4098
## . words exchange - bottom 0.012601 0.0680 93.0 0.185 0.8533
## . words top - bottom -0.043677 0.0680 93.0 -0.643 0.5220
anova_E1_rLO_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_LO,
Label == label_LO[[2]],
Layout %in% c("intact", "exchange")))
anova(anova_E1_rLO_ie, "pes")
contrast(emmeans(anova_E1_rLO_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words -0.227 0.0815 17 -2.789 0.0126
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_rLO_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.0872 0.0453 17 1.924 0.0712
##
## Results are averaged over the levels of: FaceWord
emm_E1_rLO_ie <- emmeans(anova_E1_rLO_ie, ~ FaceWord + Layout)
contrast(emm_E1_rLO_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words intact - exchange 0.175 0.0746 17 2.348 0.0312
(simple_E1_rLO_ie <- pairs(emm_E1_rLO_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . faces - words -0.139667 0.0896 23.8 -1.559 0.1322
## exchange . faces - words -0.314757 0.0896 23.8 -3.513 0.0018
## . faces intact - exchange 0.174783 0.0587 32.8 2.978 0.0054
## . words intact - exchange -0.000307 0.0587 32.8 -0.005 0.9959
2(face vs. word) \(\times\) 2(top vs. bottom) ANOVA
anova_E1_rLO_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E1_LO,
Label == label_LO[[2]],
Layout %in% c("top", "bottom")))
anova(anova_E1_rLO_tb, "pes")
contrast(emmeans(anova_E1_rLO_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## faces - words -0.224 0.0764 17 -2.935 0.0092
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_rLO_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## top - bottom -0.0538 0.0462 17 -1.165 0.2602
##
## Results are averaged over the levels of: FaceWord
emm_E1_rLO_tb <- emmeans(anova_E1_rLO_tb, ~ FaceWord + Layout)
contrast(emm_E1_rLO_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## faces - words top - bottom -0.0202 0.0839 17 -0.241 0.8123
(simple_E1_rLO_tb <- pairs(emm_E1_rLO_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## top . faces - words -0.2345 0.0872 26.4 -2.689 0.0122
## bottom . faces - words -0.2143 0.0872 26.4 -2.457 0.0209
## . faces top - bottom -0.0639 0.0624 33.7 -1.024 0.3129
## . words top - bottom -0.0437 0.0624 33.7 -0.700 0.4887
anova_E1_rLO_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E1 %>%
filter(grepl("rh.o-vs-scr", Label)))
anova_E1_rLO_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 17 0.61 9.70 ** .019 .006
## 2 Layout 2.12, 36.00 0.25 1.89 .003 .164
## 3 Area 1.09, 18.45 0.25 12.27 ** .011 .002
## 4 FaceWord:Layout 2.66, 45.16 0.12 1.65 .002 .196
## 5 FaceWord:Area 1.03, 17.57 0.03 1.58 <.001 .225
## 6 Layout:Area 2.68, 45.48 0.00 2.80 + <.001 .056
## 7 FaceWord:Layout:Area 2.92, 49.70 0.00 1.35 <.001 .269
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E1_rLO_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## faces - words X50 -0.231 0.0671 19 -3.443 0.0027
## faces - words X100 -0.212 0.0671 19 -3.160 0.0052
## faces - words X200 -0.190 0.0671 19 -2.828 0.0107
## faces - words X300 -0.180 0.0671 19 -2.676 0.0149
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E1_rLO_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 0.1069 0.0501 53.2 2.134 0.0375
## intact - top X50 0.1321 0.0501 53.2 2.636 0.0110
## intact - bottom X50 0.0649 0.0501 53.2 1.296 0.2007
## exchange - top X50 0.0251 0.0501 53.2 0.502 0.6179
## exchange - bottom X50 -0.0420 0.0501 53.2 -0.838 0.4056
## top - bottom X50 -0.0672 0.0501 53.2 -1.340 0.1859
## intact - exchange X100 0.0925 0.0501 53.2 1.846 0.0705
## intact - top X100 0.1188 0.0501 53.2 2.371 0.0214
## intact - bottom X100 0.0680 0.0501 53.2 1.357 0.1807
## exchange - top X100 0.0263 0.0501 53.2 0.526 0.6012
## exchange - bottom X100 -0.0245 0.0501 53.2 -0.489 0.6268
## top - bottom X100 -0.0509 0.0501 53.2 -1.015 0.3147
## intact - exchange X200 0.0759 0.0501 53.2 1.515 0.1356
## intact - top X200 0.1056 0.0501 53.2 2.108 0.0398
## intact - bottom X200 0.0679 0.0501 53.2 1.355 0.1812
## exchange - top X200 0.0297 0.0501 53.2 0.593 0.5560
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E1_rLO_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange faces - words X50 0.196 0.0765 54.4 2.565 0.0131
## intact - exchange faces - words X100 0.175 0.0765 54.4 2.282 0.0264
## intact - exchange faces - words X200 0.148 0.0765 54.4 1.935 0.0583
## intact - exchange faces - words X300 0.133 0.0765 54.4 1.733 0.0888
contrast(emmeans(anova_E1_rLO_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange faces X50 0.20505 0.063 100 3.253 0.0016
## intact - exchange words X50 0.00881 0.063 100 0.140 0.8891
## intact - exchange faces X100 0.17977 0.063 100 2.852 0.0053
## intact - exchange words X100 0.00519 0.063 100 0.082 0.9346
## intact - exchange faces X200 0.14994 0.063 100 2.378 0.0193
## intact - exchange words X200 0.00192 0.063 100 0.030 0.9758
## intact - exchange faces X300 0.13067 0.063 100 2.073 0.0408
## intact - exchange words X300 -0.00191 0.063 100 -0.030 0.9759
# add the column of Hemisphere
nRow_E1 <-nrow(as.data.frame(emm_aov_E1_lLO))
Hemisphere <- c(rep("left", nRow_E1), rep("right", nRow_E1))
desp_uni_E1_LO <- cbind(Hemisphere, rbind(as.data.frame(emm_aov_E1_lLO), as.data.frame(emm_aov_E1_rLO)))
plot_uni_E1_LO <- plot_uni(desp_uni_E1_LO, contr_aov_E1_lLO, contr_aov_E1_rLO, "LO")
# ggsave('plot_uni_E1_LO.png', plot_uni_E1_LO, width = 10, height = 10)
plot_uni_E1_LO
The above figure shows the neural respones (beta values) in LO for each condition. The numbers are the p-values for the tests of differences between intact vs. exchange in that condition. Error bars represent 95% confidence intervals. Note: *, p < .05
# add the column of Hemisphere
nRow_E1 <-nrow(as.data.frame(emm_E1_lLO_ie))
Hemisphere <- c(rep("left", nRow_E1), rep("right", nRow_E1))
desp_uni_E1_LO_ie <- cbind(Hemisphere, rbind(as.data.frame(emm_E1_lLO_ie), as.data.frame(emm_E1_rLO_ie)))
plot_uni_E1_LO_ie <- plot_uni(desp_uni_E1_LO_ie, simple_E1_lLO_ie, simple_E1_rLO_ie, "LO", F)
# ggsave('plot_uni_E1_LO_ie.png', plot_uni_E1_LO_ie, width = 10, height = 5)
plot_uni_E1_LO_ie
# add the column of Hemisphere
nRow_E1 <-nrow(as.data.frame(emm_E1_lLO_tb))
Hemisphere <- c(rep("left", nRow_E1), rep("right", nRow_E1))
desp_uni_E1_LO_tb <- cbind(Hemisphere, rbind(as.data.frame(emm_E1_lLO_tb), as.data.frame(emm_E1_rLO_tb)))
plot_uni_E1_LO_tb <- plot_uni(desp_uni_E1_LO_tb, simple_E1_lLO_tb, simple_E1_rLO_tb, "LO", F)
# ggsave('plot_uni_E1_LO_tb.png', plot_uni_E1_LO_tb, width = 10, height = 5)
plot_uni_E1_LO_tb
# one-sample for results of decode E1 LO
one_decode_agg_E1_LO <- {
df_decode_E1_LO %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1)) %>%
group_by(Hemisphere, ClassifyPair) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_agg_E1_LO
plot_decode_E1_LO <- plot_decode(one_decode_agg_E1_LO, "LO")
# ggsave('plot_decode_E1_LO.png', plot_decode_E1_LO, width = 6.5, height = 16)
plot_decode_E1_LO
The above figure shows the decoding accuracy in LO for each pair. The numbers are the p-values for the one-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals. Note: , p < .01; *, p <.001
# one-sample for results of decode E1 LO
one_decode_area_agg_E1_LO<- {
df_decode_area_acc_E1 %>%
filter(grepl("o-vs-scr", Label)) %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1),
Area = as.numeric(str_extract(Label, "\\d*0"))) %>%
group_by(Hemisphere, ClassifyPair, Area) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_area_agg_E1_LO
# Similarity of top + bottom to intact vs. exchange in LO
one_simi_E1_LO <- {
df_simi_E1_LO %>%
group_by(Hemisphere, Combination) %>%
summarize(mean = t.test(RateAsExchange, mu = 0.5)[[5]],
SE = t.test(RateAsExchange, mu = 0.5)[[7]],
cohens_d = (mean-0.5)/sd(RateAsExchange),
t = t.test(RateAsExchange, mu = 0.5)[[1]],
df = t.test(RateAsExchange, mu = 0.5)[[2]],
p = round(t.test(RateAsExchange, mu = 0.5)[[3]], 5),
lower.CL = t.test(RateAsExchange, mu = 0.5)[[4]][1],
upper.CL = t.test(RateAsExchange, mu = 0.5)[[4]][2],
nullValue = t.test(RateAsExchange, mu = 0.5)[[6]],
alternative = t.test(RateAsExchange, mu = 0.5)[[8]]
)
}
one_simi_E1_LO
plot_simi_E1_LO <- plot_simi(one_simi_E1_LO, "LO")
# ggsave('plot_simi_E1_LO.png', plot_simi_E1_LO, width = 8, height = 10)
plot_simi_E1_LO
The above figure shows the probability of top+bottom being decoded as exchange conditions in LO. Patterns of top and bottom were combined with different weights, i.e., “face_top0.25-face_bottom0.75” denotes the linear combinations of face_top and face_bottom with the weights of 0.25/0.75. The numbers are the p-values for the two-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals.
df_label_E2 <- read_csv(file.path("data", "faceword_E2_Label_HJ.csv")) %>%
mutate(roi = str_remove(Label, "roi."),
roi = str_remove(roi, ".label")) %>%
mutate(Subject = str_replace(SubjCode, "\\_.*", ""))
# df_label %>% head()
df_label_E2 %>%
select(SubjCode, roi, Size) %>%
pivot_wider(names_from = roi, values_from = Size) %>%
arrange(SubjCode)
The above table displays the size (in mm2) of each label for each participant. (NA denotes that this label is not available for that particiapnt.)
df_label_E2 %>%
select(SubjCode, roi, NVtxs) %>%
pivot_wider(names_from = roi, values_from = NVtxs) %>%
arrange(SubjCode)
The above table displays the number of vertices for each label and each participant. (NA denotes that this label is not available for that participant.)
df_label_E2 %>%
group_by(Label, roi) %>%
summarize(Count = n(),
meanSize = mean(Size),
SDSize = sd(Size),
meanNVtx = mean(NVtxs),
SDNVtx = sd(NVtxs))
df_nlabel_E2 <- df_label_E2 %>%
filter(Size > nVtx_size_min) %>%
group_by(Label, roi) %>%
summarize(Count = n(),
meanSize = mean(Size),
SDSize = sd(Size),
meanNVtx = mean(NVtxs),
SDNVtx = sd(NVtxs))
df_nlabel_E2
The above table displays the number of participants included in the following analyses for each ROI. (VWFA is only found on the left hemisphere.)
# load data file from functional scans for univerate analysis
df_uni_E2 <- read_csv(file.path("data", "faceword_E2_Uni_HJ.csv"))
head(df_uni_E2)
df_clean_uni_E2 <- {
df_uni_E2 %>%
filter(Response != "NaN") %>%
separate(Condition, c("FaceWord", "Layout"), "_") %>% # separate the conditions into two IVs
mutate(Layout_ = factor(Layout, levels = layout_order), # convert the two IVs to factors
Hemisphere = if_else(grepl("lh", Label), "left", if_else(grepl("rh", Label), "right", "NA")),
Layout = fct_recode(Layout_, partA = "top", partB = "bottom")) %>% # rename top and bottom as part1 and part2
select(Hemisphere, Label, SessCode, FaceWord, Layout, Response) %>%
mutate(Subject = str_replace(SessCode, "\\_.*", "")) %>%
left_join(df_label_E2, by = c("Label", "Subject")) %>%
filter(Size > nVtx_size_min)
}
head(df_clean_uni_E2)
df_area_uni_E2 <- read_csv(file.path("data_roi_area", "faceword_E2_Uni_area_HJ.csv"))
df_clean_area_uni_E2 <- {
df_area_uni_E2 %>%
filter(Response != "NaN") %>%
separate(Condition, c("FaceWord", "Layout"), "_") %>% # separate the conditions into two IVs
mutate(FaceWord = gsub("face", "faces", FaceWord),
FaceWord = gsub("word", "words", FaceWord),
Layout = factor(Layout, levels = layout_order), # convert the two IVs to factors
Hemisphere = if_else(grepl("lh", Label), "left", if_else(grepl("rh", Label), "right", "NA"))) %>%
select(Hemisphere, Label, SessCode, FaceWord, Layout, Area, Response) %>%
mutate(Subject = str_replace(SessCode, "\\_.*", ""))
}
head(df_clean_area_uni_E2)
pair_order_E2 <- c("English_intact-Chinese_intact",
"English_intact-English_exchange",
"English_partA-English_partB", # English_top-English_bottom
"Chinese_intact-Chinese_exchange",
"Chinese_partA-Chinese_partB") # Chinese_top-Chinese_bottom
df_decode_E2 <- read_csv(file.path("data", "faceword_E2_Decode_noz.csv"))
head(df_decode_E2)
df_clean_decode_E2 <- df_decode_E2 %>%
select(Label, SessCode, ClassifyPair, ACC) %>%
mutate(Hemisphere = if_else(grepl("lh", Label), "left",
if_else(grepl("rh", Label), "right", "NA")),
Subject = str_remove(SessCode, "\\_.*"),
ClassifyPair = fct_recode(ClassifyPair,
`Chinese_partA-Chinese_partB` = "Chinese_top-Chinese_bottom",
`English_partA-English_partB` = "English_top-English_bottom"),
ClassifyPair = factor(ClassifyPair, levels = pair_order_E2)) %>%
left_join(df_label_E2, by = c("Label", "Subject")) %>%
filter(Size > nVtx_size_min)
df_decode_acc_E2 <- df_clean_decode_E2 %>%
group_by(Hemisphere, Label, SessCode, ClassifyPair) %>% # divide the data into groups by these columns
summarize(Accuracy = mean(ACC), Count = n()) %>%
ungroup()
df_decode_acc_E2
df_decode_area_E2 <- read_csv(file.path("data_roi_area", "faceword_roi_area_E2_Decode_noz.csv"))
head(df_decode_area_E2)
df_decode_area_acc_E2 <- df_decode_area_E2 %>%
select(Label, SessCode, ClassifyPair, ACC) %>%
mutate(Hemisphere = if_else(grepl("lh", Label), "left",
if_else(grepl("rh", Label), "right", "NA")),
Area = str_extract(Label, "a\\d"), # find the area
Subject = str_remove(SessCode, "\\_.*")) %>%
group_by(Hemisphere, Label, SessCode, ClassifyPair) %>% # divide the data into groups by these columns
summarize(Accuracy = mean(ACC), Count = n()) %>%
ungroup()
df_decode_area_acc_E2
simi_order_E2 <- c("English_partA0.25-English_partB0.75",
"English_partA0.50-English_partB0.50",
"English_partA0.75-English_partB0.25",
"Chinese_partA0.25-Chinese_partB0.75",
"Chinese_partA0.50-Chinese_partB0.50",
"Chinese_partA0.75-Chinese_partB0.25")
df_simi_E2 <- read_csv(file.path("data", "faceword_E2_Similarity_noz.csv"))
head(df_simi_E2)
df_clean_simi_E2 <- df_simi_E2 %>%
mutate(asExchange = if_else(grepl("exchange", PredictCond), 1, 0), # binary prediction
pExchange = Probability_2, # probability prediction
Subject = str_remove(SessCode, "\\_.*"),
Combination = gsub("top", "partA", Combination),
Combination = gsub("bottom", "partB", Combination),
Combination = factor(Combination, levels = simi_order_E2)) %>%
left_join(df_label_E2, by = c("Label", "Subject")) %>%
filter(Size > nVtx_size_min)
df_rate_simi_E2 <- df_clean_simi_E2 %>%
group_by(SessCode, Label, ClassPair_1, Combination) %>%
summarize(binaryAsExchange = mean(asExchange),
pAsExchange = mean(pExchange),
RateAsExchange = pAsExchange) %>% # use the probability instead of the categorical prediction
ungroup() %>%
mutate(Hemisphere = if_else(grepl("lh", Label), 'left', if_else(grepl("rh", Label), "right", "NA")))
head(df_rate_simi_E2)
# only keep data for these two labels
df_uni_E2_FFA1 <- filter(df_clean_uni_E2, Label %in% label_FFA1)
df_decode_E2_FFA1 <- filter(df_decode_acc_E2, Label %in% label_FFA1)
df_simi_E2_FFA1 <- filter(df_rate_simi_E2, Label %in% label_FFA1)
df_uni_E2_FFA1 %>%
select(Hemisphere, Label, SessCode) %>%
distinct() %>%
group_by(Hemisphere, Label) %>%
summarize(Count = n())
anova_E2_lFFA1 <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_FFA1, Label == label_FFA1[[1]]))
anova_E2_lFFA1
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 11 0.22 12.53 ** .099 .005
## 2 Layout 1.73, 19.00 0.03 3.34 + .007 .063
## 3 FaceWord:Layout 2.25, 24.78 0.04 4.10 * .015 .025
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E2_lFFA1 <- emmeans(anova_E2_lFFA1, ~ FaceWord * Layout)
emm_aov_E2_lFFA1 %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E2_lFFA1, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese 0.338 0.0954 11 3.539 0.0046
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E2_lFFA1, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange -0.10656 0.0394 33 -2.706 0.0499
## intact - partA 0.00125 0.0394 33 0.032 1.0000
## intact - partB -0.04698 0.0394 33 -1.193 0.6354
## exchange - partA 0.10781 0.0394 33 2.738 0.0464
## exchange - partB 0.05958 0.0394 33 1.513 0.4414
## partA - partB -0.04823 0.0394 33 -1.225 0.6159
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E2_lFFA1 <- contrast(emm_aov_E2_lFFA1, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_anova_E2, interaction = "pairwise") # , adjust = "none"
contr_aov_E2_lFFA1
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese 0.34336 0.1134 20.8 3.027 0.0065
## exchange . English - Chinese 0.44662 0.1134 20.8 3.937 0.0008
## partA . English - Chinese 0.13346 0.1134 20.8 1.176 0.2527
## partB . English - Chinese 0.42759 0.1134 20.8 3.769 0.0011
## . English intact - exchange -0.15819 0.0637 62.5 -2.483 0.0157
## . English intact - partA 0.10620 0.0637 62.5 1.667 0.1005
## . English intact - partB -0.08909 0.0637 62.5 -1.398 0.1669
## . English exchange - partA 0.26440 0.0637 62.5 4.150 0.0001
## . English exchange - partB 0.06910 0.0637 62.5 1.085 0.2823
## . English partA - partB -0.19530 0.0637 62.5 -3.065 0.0032
## . Chinese intact - exchange -0.05493 0.0637 62.5 -0.862 0.3919
## . Chinese intact - partA -0.10370 0.0637 62.5 -1.628 0.1086
## . Chinese intact - partB -0.00486 0.0637 62.5 -0.076 0.9394
## . Chinese exchange - partA -0.04877 0.0637 62.5 -0.765 0.4469
## . Chinese exchange - partB 0.05007 0.0637 62.5 0.786 0.4349
## . Chinese partA - partB 0.09884 0.0637 62.5 1.551 0.1259
2(English words vs. Chinese characters) \(\times\) 2(intact vs. exchange) ANOVA
anova_E2_lFFA1_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_FFA1,
Label == label_FFA1[[1]],
Layout %in% c("intact", "exchange")))
anova(anova_E2_lFFA1_ie, "pes")
contrast(emmeans(anova_E2_lFFA1_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese 0.395 0.104 11 3.798 0.0030
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_lFFA1_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange -0.107 0.0493 11 -2.160 0.0537
##
## Results are averaged over the levels of: FaceWord
emm_E2_lFFA1_ie <- emmeans(anova_E2_lFFA1_ie, ~ FaceWord + Layout)
contrast(emm_E2_lFFA1_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese intact - exchange -0.103 0.111 11 -0.933 0.3707
(simple_E2_lFFA1_ie <- pairs(emm_E2_lFFA1_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese 0.3434 0.1178 16.8 2.915 0.0098
## exchange . English - Chinese 0.4466 0.1178 16.8 3.791 0.0015
## . English intact - exchange -0.1582 0.0741 21.7 -2.134 0.0444
## . Chinese intact - exchange -0.0549 0.0741 21.7 -0.741 0.4666
2(English words vs. Chinese characters) \(\times\) 2(top vs. bottom) ANOVA
anova_E2_lFFA1_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_FFA1,
Label == label_FFA1[[1]],
Layout %in% c("partA", "partB")))
anova(anova_E2_lFFA1_tb, "pes")
contrast(emmeans(anova_E2_lFFA1_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese 0.281 0.0921 11 3.045 0.0111
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_lFFA1_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## partA - partB -0.0482 0.0284 11 -1.695 0.1181
##
## Results are averaged over the levels of: FaceWord
emm_E2_lFFA1_tb <- emmeans(anova_E2_lFFA1_tb, ~ FaceWord + Layout)
contrast(emm_E2_lFFA1_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese partA - partB -0.294 0.116 11 -2.531 0.0279
(simple_E2_lFFA1_tb <- pairs(emm_E2_lFFA1_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## partA . English - Chinese 0.1335 0.1089 18.6 1.225 0.2358
## partB . English - Chinese 0.4276 0.1089 18.6 3.926 0.0009
## . English partA - partB -0.1953 0.0647 16.0 -3.019 0.0082
## . Chinese partA - partB 0.0988 0.0647 16.0 1.528 0.1461
anova_E2_lFFA1_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E2 %>%
filter(grepl("lh.f-vs-o.ffa1", Label)))
anova_E2_lFFA1_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 12 1.13 6.74 * .066 .023
## 2 Layout 1.62, 19.41 0.11 4.32 * .007 .035
## 3 Area 1.04, 12.51 0.09 1.24 .001 .290
## 4 FaceWord:Layout 2.34, 28.05 0.14 3.33 * .010 .044
## 5 FaceWord:Area 1.12, 13.50 0.01 6.97 * .001 .018
## 6 Layout:Area 2.32, 27.87 0.00 1.18 <.001 .329
## 7 FaceWord:Layout:Area 1.96, 23.58 0.00 2.43 <.001 .110
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E2_lFFA1_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## English - Chinese X50 0.314 0.105 12.3 2.986 0.0110
## English - Chinese X100 0.289 0.105 12.3 2.756 0.0170
## English - Chinese X200 0.252 0.105 12.3 2.398 0.0331
## English - Chinese X300 0.228 0.105 12.3 2.167 0.0504
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_lFFA1_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 -0.11127 0.0348 38.9 -3.195 0.0028
## intact - top X50 -0.00987 0.0348 38.9 -0.283 0.7784
## intact - bottom X50 -0.06204 0.0348 38.9 -1.782 0.0826
## exchange - top X50 0.10141 0.0348 38.9 2.912 0.0059
## exchange - bottom X50 0.04923 0.0348 38.9 1.414 0.1654
## top - bottom X50 -0.05218 0.0348 38.9 -1.498 0.1421
## intact - exchange X100 -0.10582 0.0348 38.9 -3.039 0.0042
## intact - top X100 -0.00176 0.0348 38.9 -0.050 0.9600
## intact - bottom X100 -0.05024 0.0348 38.9 -1.443 0.1572
## exchange - top X100 0.10406 0.0348 38.9 2.988 0.0048
## exchange - bottom X100 0.05558 0.0348 38.9 1.596 0.1186
## top - bottom X100 -0.04848 0.0348 38.9 -1.392 0.1718
## intact - exchange X200 -0.10002 0.0348 38.9 -2.872 0.0066
## intact - top X200 0.01134 0.0348 38.9 0.326 0.7464
## intact - bottom X200 -0.03764 0.0348 38.9 -1.081 0.2864
## exchange - top X200 0.11137 0.0348 38.9 3.198 0.0028
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E2_lFFA1_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange English - Chinese X50 -0.101 0.094 38 -1.077 0.2883
## intact - exchange English - Chinese X100 -0.107 0.094 38 -1.136 0.2630
## intact - exchange English - Chinese X200 -0.105 0.094 38 -1.122 0.2689
## intact - exchange English - Chinese X300 -0.104 0.094 38 -1.105 0.2761
contrast(emmeans(anova_E2_lFFA1_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange English X50 -0.1619 0.0585 70.5 -2.768 0.0072
## intact - exchange Chinese X50 -0.0607 0.0585 70.5 -1.038 0.3030
## intact - exchange English X100 -0.1592 0.0585 70.5 -2.722 0.0082
## intact - exchange Chinese X100 -0.0524 0.0585 70.5 -0.897 0.3728
## intact - exchange English X200 -0.1527 0.0585 70.5 -2.612 0.0110
## intact - exchange Chinese X200 -0.0473 0.0585 70.5 -0.809 0.4212
## intact - exchange English X300 -0.1492 0.0585 70.5 -2.551 0.0129
## intact - exchange Chinese X300 -0.0453 0.0585 70.5 -0.775 0.4407
anova_E2_rFFA1 <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_FFA1, Label == label_FFA1[[2]]))
anova_E2_rFFA1
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 14 0.13 0.65 .008 .434
## 2 Layout 2.74, 38.34 0.03 2.08 .015 .124
## 3 FaceWord:Layout 2.18, 30.55 0.03 1.39 .009 .264
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E2_rFFA1 <- emmeans(anova_E2_rFFA1, ~ FaceWord * Layout)
emm_aov_E2_rFFA1 %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E2_rFFA1, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese -0.0522 0.0648 14 -0.805 0.4341
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E2_rFFA1, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.0605 0.0406 42 1.490 0.4522
## intact - partA -0.0299 0.0406 42 -0.738 0.8814
## intact - partB 0.0445 0.0406 42 1.098 0.6929
## exchange - partA -0.0904 0.0406 42 -2.228 0.1323
## exchange - partB -0.0159 0.0406 42 -0.393 0.9792
## partA - partB 0.0745 0.0406 42 1.835 0.2716
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E2_rFFA1 <- contrast(emm_aov_E2_rFFA1, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_anova_E2, interaction = "pairwise") # , adjust = "none"
contr_aov_E2_rFFA1
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese 0.00632 0.0794 29.1 0.080 0.9371
## exchange . English - Chinese -0.13621 0.0794 29.1 -1.716 0.0969
## partA . English - Chinese -0.06054 0.0794 29.1 -0.763 0.4519
## partB . English - Chinese -0.01847 0.0794 29.1 -0.233 0.8177
## . English intact - exchange 0.13175 0.0552 83.5 2.387 0.0192
## . English intact - partA 0.00350 0.0552 83.5 0.063 0.9496
## . English intact - partB 0.05694 0.0552 83.5 1.032 0.3052
## . English exchange - partA -0.12825 0.0552 83.5 -2.324 0.0226
## . English exchange - partB -0.07481 0.0552 83.5 -1.355 0.1789
## . English partA - partB 0.05344 0.0552 83.5 0.968 0.3357
## . Chinese intact - exchange -0.01078 0.0552 83.5 -0.195 0.8456
## . Chinese intact - partA -0.06337 0.0552 83.5 -1.148 0.2542
## . Chinese intact - partB 0.03215 0.0552 83.5 0.582 0.5618
## . Chinese exchange - partA -0.05258 0.0552 83.5 -0.953 0.3434
## . Chinese exchange - partB 0.04293 0.0552 83.5 0.778 0.4389
## . Chinese partA - partB 0.09551 0.0552 83.5 1.731 0.0872
anova_E2_rFFA1_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_FFA1,
Label == label_FFA1[[2]],
Layout %in% c("intact", "exchange")))
anova(anova_E2_rFFA1_ie, "pes")
contrast(emmeans(anova_E2_rFFA1_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese -0.0649 0.0786 14 -0.827 0.4224
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_rFFA1_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.0605 0.0454 14 1.332 0.2042
##
## Results are averaged over the levels of: FaceWord
emm_E2_rFFA1_ie <- emmeans(anova_E2_rFFA1_ie, ~ FaceWord + Layout)
contrast(emm_E2_rFFA1_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese intact - exchange 0.143 0.0565 14 2.523 0.0244
(simple_E2_rFFA1_ie <- pairs(emm_E2_rFFA1_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese 0.00632 0.0835 17.6 0.076 0.9405
## exchange . English - Chinese -0.13621 0.0835 17.6 -1.631 0.1206
## . English intact - exchange 0.13175 0.0535 23.4 2.463 0.0215
## . Chinese intact - exchange -0.01078 0.0535 23.4 -0.202 0.8420
2(English words vs. Chinese characters) \(\times\) 2(top vs. bottom) ANOVA
anova_E2_rFFA1_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_FFA1,
Label == label_FFA1[[2]],
Layout %in% c("partA", "partB")))
anova(anova_E2_rFFA1_tb, "pes")
contrast(emmeans(anova_E2_rFFA1_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese -0.0395 0.0636 14 -0.621 0.5444
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_rFFA1_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## partA - partB 0.0745 0.0434 14 1.717 0.1080
##
## Results are averaged over the levels of: FaceWord
emm_E2_rFFA1_tb <- emmeans(anova_E2_rFFA1_tb, ~ FaceWord + Layout)
contrast(emm_E2_rFFA1_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese partA - partB -0.0421 0.0798 14 -0.527 0.6063
(simple_E2_rFFA1_tb <- pairs(emm_E2_rFFA1_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## partA . English - Chinese -0.0605 0.0751 23.5 -0.806 0.4280
## partB . English - Chinese -0.0185 0.0751 23.5 -0.246 0.8078
## . English partA - partB 0.0534 0.0589 27.8 0.907 0.3723
## . Chinese partA - partB 0.0955 0.0589 27.8 1.621 0.1164
anova_E2_rFFA1_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E2 %>%
filter(grepl("rh.f-vs-o.ffa1", Label)))
anova_E2_rFFA1_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 14 0.44 2.23 .015 .158
## 2 Layout 2.76, 38.57 0.09 1.03 .004 .387
## 3 Area 1.13, 15.80 0.15 8.61 ** .023 .008
## 4 FaceWord:Layout 2.18, 30.57 0.10 1.49 .005 .242
## 5 FaceWord:Area 1.07, 14.97 0.01 20.49 *** .003 <.001
## 6 Layout:Area 2.21, 30.99 0.00 3.95 * <.001 .026
## 7 FaceWord:Layout:Area 3.03, 42.43 0.00 0.63 <.001 .599
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E2_rFFA1_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## English - Chinese X50 -0.0372 0.0611 14.6 -0.609 0.5517
## English - Chinese X100 -0.0719 0.0611 14.6 -1.176 0.2583
## English - Chinese X200 -0.1129 0.0611 14.6 -1.848 0.0850
## English - Chinese X300 -0.1389 0.0611 14.6 -2.274 0.0386
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_rFFA1_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 0.04183 0.0385 44.6 1.085 0.2836
## intact - top X50 -0.04613 0.0385 44.6 -1.197 0.2377
## intact - bottom X50 0.03404 0.0385 44.6 0.883 0.3819
## exchange - top X50 -0.08796 0.0385 44.6 -2.282 0.0273
## exchange - bottom X50 -0.00779 0.0385 44.6 -0.202 0.8407
## top - bottom X50 0.08017 0.0385 44.6 2.080 0.0433
## intact - exchange X100 0.03790 0.0385 44.6 0.983 0.3307
## intact - top X100 -0.03013 0.0385 44.6 -0.782 0.4385
## intact - bottom X100 0.03117 0.0385 44.6 0.809 0.4230
## exchange - top X100 -0.06803 0.0385 44.6 -1.765 0.0844
## exchange - bottom X100 -0.00673 0.0385 44.6 -0.175 0.8621
## top - bottom X100 0.06129 0.0385 44.6 1.590 0.1188
## intact - exchange X200 0.02782 0.0385 44.6 0.722 0.4741
## intact - top X200 -0.01862 0.0385 44.6 -0.483 0.6313
## intact - bottom X200 0.02338 0.0385 44.6 0.607 0.5472
## exchange - top X200 -0.04645 0.0385 44.6 -1.205 0.2345
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E2_rFFA1_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange English - Chinese X50 0.1271 0.0707 45.1 1.797 0.0790
## intact - exchange English - Chinese X100 0.1125 0.0707 45.1 1.591 0.1187
## intact - exchange English - Chinese X200 0.0959 0.0707 45.1 1.356 0.1819
## intact - exchange English - Chinese X300 0.0863 0.0707 45.1 1.220 0.2288
contrast(emmeans(anova_E2_rFFA1_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange English X50 0.1054 0.0523 88.9 2.015 0.0470
## intact - exchange Chinese X50 -0.0217 0.0523 88.9 -0.415 0.6791
## intact - exchange English X100 0.0941 0.0523 88.9 1.800 0.0753
## intact - exchange Chinese X100 -0.0183 0.0523 88.9 -0.351 0.7268
## intact - exchange English X200 0.0758 0.0523 88.9 1.449 0.1510
## intact - exchange Chinese X200 -0.0201 0.0523 88.9 -0.385 0.7014
## intact - exchange English X300 0.0634 0.0523 88.9 1.212 0.2286
## intact - exchange Chinese X300 -0.0229 0.0523 88.9 -0.437 0.6629
# add the column of Hemisphere
nRow_E2 <-nrow(as.data.frame(emm_aov_E2_lFFA1))
Hemisphere <- c(rep("left", nRow_E2), rep("right", nRow_E2))
desp_uni_E2_FFA1 <- cbind(Hemisphere, rbind(as.data.frame(emm_aov_E2_lFFA1), as.data.frame(emm_aov_E2_rFFA1)))
plot_uni_E2_FFA1 <- plot_uni(desp_uni_E2_FFA1, contr_aov_E2_lFFA1, contr_aov_E2_rFFA1, "FFA1")
# ggsave('plot_uni_E2_FFA1.png', plot_uni_E2_FFA1, width = 10, height = 10)
plot_uni_E2_FFA1
The above figure shows the neural respones (beta values) in FFA1 for each condition. The numbers are the p-values for the tests of differences between intact vs. exchange in that condition. Error bars represent 95% confidence intervals. Note: “*p<0.1;**p<0.05;***p<0.01”
# add the column of Hemisphere
nRow_E2 <-nrow(as.data.frame(emm_E2_lFFA1_ie))
Hemisphere <- c(rep("left", nRow_E2), rep("right", nRow_E2))
desp_uni_E2_FFA1_ie <- cbind(Hemisphere, rbind(as.data.frame(emm_E2_lFFA1_ie), as.data.frame(emm_E2_rFFA1_ie)))
plot_uni_E2_FFA1_ie <- plot_uni(desp_uni_E2_FFA1_ie, simple_E2_lFFA1_ie, simple_E2_rFFA1_ie, "FFA1", F)
# ggsave('plot_uni_E2_FFA1_ie.png', plot_uni_E2_FFA1_ie, width = 10, height = 5)
plot_uni_E2_FFA1_ie
# add the column of Hemisphere
nRow_E2 <-nrow(as.data.frame(emm_E2_lFFA1_tb))
Hemisphere <- c(rep("left", nRow_E2), rep("right", nRow_E2))
desp_uni_E2_FFA1_tb <- cbind(Hemisphere, rbind(as.data.frame(emm_E2_lFFA1_tb), as.data.frame(emm_E2_rFFA1_tb)))
plot_uni_E2_FFA1_tb <- plot_uni(desp_uni_E2_FFA1_tb, simple_E2_lFFA1_tb, simple_E2_rFFA1_tb, "FFA1", F, T)
# ggsave('plot_uni_E2_FFA1_tb.png', plot_uni_E2_FFA1_tb, width = 10, height = 5)
plot_uni_E2_FFA1_tb
# one-sample for results of decode E2 FFA1
one_decode_agg_E2_FFA1 <- {
df_decode_E2_FFA1 %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E2)) %>%
group_by(Hemisphere, ClassifyPair) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_agg_E2_FFA1
plot_decode_E2_FFA1 <- plot_decode(one_decode_agg_E2_FFA1, "FFA1")
# ggsave('plot_decode_E2_FFA1.png', plot_decode_E2_FFA1, width = 6.5, height = 16)
plot_decode_E2_FFA1
The above figure shows the decoding accuracy in FFA1 for each pair. The numbers are the p-values for the one-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals. Note: “*p<0.1;**p<0.05;***p<0.01”
# one-sample for results of decode E2 FFA1
one_decode_area_agg_E2_FFA1 <- {
df_decode_area_acc_E2 %>%
filter(grepl("f-vs-o.ffa1", Label)) %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1),
Area = as.numeric(str_extract(Label, "\\d*0"))) %>%
group_by(Hemisphere, ClassifyPair, Area) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_area_agg_E2_FFA1
lFFA1 can decode Chinese intact vs. exchange (300mm^2). lFFA1 can decode English intact vs. exchange (50, 300mm^2).
rFFA1 can decode English intact vs. exchange (50, 200, 300mm^2).
one_simi_E2_FFA1 <- {
df_simi_E2_FFA1 %>%
group_by(Hemisphere, Combination) %>%
summarize(mean = t.test(RateAsExchange, mu = 0.5)[[5]],
SE = t.test(RateAsExchange, mu = 0.5)[[7]],
cohens_d = (mean-0.5)/sd(RateAsExchange),
t = t.test(RateAsExchange, mu = 0.5)[[1]],
df = t.test(RateAsExchange, mu = 0.5)[[2]],
p = round(t.test(RateAsExchange, mu = 0.5)[[3]], 5),
lower.CL = t.test(RateAsExchange, mu = 0.5)[[4]][1],
upper.CL = t.test(RateAsExchange, mu = 0.5)[[4]][2],
nullValue = t.test(RateAsExchange, mu = 0.5)[[6]],
alternative = t.test(RateAsExchange, mu = 0.5)[[8]]
)
}
one_simi_E2_FFA1
plot_simi_E2_FFA1 <- plot_simi(one_simi_E2_FFA1, "FFA1")
# ggsave('plot_simi_E2_FFA1.png', plot_simi_E2_FFA1, width = 8, height = 10)
plot_simi_E2_FFA1
The above figure shows the probability of top+bottom being decoded as exchange conditions in FFA1. Patterns of top and bottom were combined with different weights, i.e., “face_top0.25-face_bottom0.75” denotes the linear combinations of face_top and face_bottom with the weights of 0.25/0.75. The numbers are the p-values for the two-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals.
# only keep data for these two labels
df_uni_E2_FFA2 <- filter(df_clean_uni_E2, Label %in% label_FFA2)
df_decode_E2_FFA2 <- filter(df_decode_acc_E2, Label %in% label_FFA2)
df_simi_E2_FFA2 <- filter(df_rate_simi_E2, Label %in% label_FFA2)
df_uni_E2_FFA2 %>%
select(Hemisphere, Label, SessCode) %>%
distinct() %>%
group_by(Hemisphere, Label) %>%
summarize(Count = n())
anova_E2_lFFA2 <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_FFA2, Label == label_FFA2[[1]]))
anova_E2_lFFA2
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 12 0.18 8.65 * .078 .012
## 2 Layout 2.52, 30.24 0.02 0.84 .002 .467
## 3 FaceWord:Layout 2.56, 30.70 0.03 2.83 + .012 .062
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E2_lFFA2 <- emmeans(anova_E2_lFFA2, ~ FaceWord * Layout)
emm_aov_E2_lFFA2 %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E2_lFFA2, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese 0.247 0.084 12 2.940 0.0124
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E2_lFFA2, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.01909 0.0343 36 0.556 0.9442
## intact - partA 0.02635 0.0343 36 0.768 0.8683
## intact - partB -0.02327 0.0343 36 -0.678 0.9047
## exchange - partA 0.00726 0.0343 36 0.212 0.9966
## exchange - partB -0.04236 0.0343 36 -1.234 0.6095
## partA - partB -0.04962 0.0343 36 -1.446 0.4799
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E2_lFFA2 <- contrast(emm_aov_E2_lFFA2, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_anova_E2, interaction = "pairwise") # , adjust = "none"
contr_aov_E2_lFFA2
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese 0.3426 0.1002 23.0 3.418 0.0024
## exchange . English - Chinese 0.2466 0.1002 23.0 2.460 0.0218
## partA . English - Chinese 0.0986 0.1002 23.0 0.984 0.3355
## partB . English - Chinese 0.2999 0.1002 23.0 2.992 0.0065
## . English intact - exchange 0.0671 0.0564 67.5 1.191 0.2379
## . English intact - partA 0.1484 0.0564 67.5 2.633 0.0105
## . English intact - partB -0.0019 0.0564 67.5 -0.034 0.9732
## . English exchange - partA 0.0813 0.0564 67.5 1.442 0.1539
## . English exchange - partB -0.0690 0.0564 67.5 -1.224 0.2250
## . English partA - partB -0.1503 0.0564 67.5 -2.666 0.0096
## . Chinese intact - exchange -0.0289 0.0564 67.5 -0.513 0.6096
## . Chinese intact - partA -0.0957 0.0564 67.5 -1.697 0.0942
## . Chinese intact - partB -0.0446 0.0564 67.5 -0.792 0.4311
## . Chinese exchange - partA -0.0667 0.0564 67.5 -1.184 0.2404
## . Chinese exchange - partB -0.0157 0.0564 67.5 -0.279 0.7811
## . Chinese partA - partB 0.0510 0.0564 67.5 0.905 0.3685
2(English words vs. Chinese characters) \(\times\) 2(intact vs. exchange) ANOVA
anova_E2_lFFA2_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_FFA2,
Label == label_FFA2[[1]],
Layout %in% c("intact", "exchange")))
anova(anova_E2_lFFA2_ie, "pes")
contrast(emmeans(anova_E2_lFFA2_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese 0.295 0.0871 12 3.384 0.0054
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_lFFA2_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.0191 0.0314 12 0.608 0.5548
##
## Results are averaged over the levels of: FaceWord
emm_E2_lFFA2_ie <- emmeans(anova_E2_lFFA2_ie, ~ FaceWord + Layout)
contrast(emm_E2_lFFA2_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese intact - exchange 0.096 0.104 12 0.924 0.3738
(simple_E2_lFFA2_ie <- pairs(emm_E2_lFFA2_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese 0.3426 0.1014 19.6 3.379 0.0030
## exchange . English - Chinese 0.2466 0.1014 19.6 2.432 0.0247
## . English intact - exchange 0.0671 0.0607 19.7 1.105 0.2825
## . Chinese intact - exchange -0.0289 0.0607 19.7 -0.476 0.6392
2(English words vs. Chinese characters) \(\times\) 2(top vs. bottom) ANOVA
anova_E2_lFFA2_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_FFA2,
Label == label_FFA2[[1]],
Layout %in% c("partA", "partB")))
anova(anova_E2_lFFA2_tb, "pes")
contrast(emmeans(anova_E2_lFFA2_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese 0.199 0.0861 12 2.314 0.0392
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_lFFA2_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## partA - partB -0.0496 0.0417 12 -1.191 0.2568
##
## Results are averaged over the levels of: FaceWord
emm_E2_lFFA2_tb <- emmeans(anova_E2_lFFA2_tb, ~ FaceWord + Layout)
contrast(emm_E2_lFFA2_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese partA - partB -0.201 0.098 12 -2.053 0.0625
(simple_E2_lFFA2_tb <- pairs(emm_E2_lFFA2_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## partA . English - Chinese 0.0986 0.0991 19.0 0.995 0.3321
## partB . English - Chinese 0.2999 0.0991 19.0 3.027 0.0069
## . English partA - partB -0.1503 0.0643 23.4 -2.336 0.0284
## . Chinese partA - partB 0.0510 0.0643 23.4 0.793 0.4357
anova_E2_lFFA2_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E2 %>%
filter(grepl("lh.f-vs-o.ffa2", Label)))
anova_E2_lFFA2_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 15 0.58 9.22 ** .066 .008
## 2 Layout 2.66, 39.86 0.05 1.45 .003 .245
## 3 Area 1.15, 17.30 0.05 0.34 <.001 .596
## 4 FaceWord:Layout 2.79, 41.78 0.08 3.93 * .012 .017
## 5 FaceWord:Area 1.14, 17.08 0.01 2.34 <.001 .143
## 6 Layout:Area 2.87, 42.99 0.00 0.22 <.001 .872
## 7 FaceWord:Layout:Area 2.40, 35.94 0.00 0.88 <.001 .442
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E2_lFFA2_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## English - Chinese X50 0.221 0.0681 15.7 3.253 0.0051
## English - Chinese X100 0.216 0.0681 15.7 3.166 0.0061
## English - Chinese X200 0.198 0.0681 15.7 2.916 0.0103
## English - Chinese X300 0.182 0.0681 15.7 2.679 0.0167
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_lFFA2_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 -0.00145 0.0281 50.5 -0.052 0.9590
## intact - top X50 0.02551 0.0281 50.5 0.908 0.3680
## intact - bottom X50 -0.02905 0.0281 50.5 -1.034 0.3059
## exchange - top X50 0.02696 0.0281 50.5 0.960 0.3416
## exchange - bottom X50 -0.02760 0.0281 50.5 -0.983 0.3305
## top - bottom X50 -0.05456 0.0281 50.5 -1.943 0.0576
## intact - exchange X100 -0.00582 0.0281 50.5 -0.207 0.8366
## intact - top X100 0.02254 0.0281 50.5 0.803 0.4260
## intact - bottom X100 -0.03461 0.0281 50.5 -1.232 0.2235
## exchange - top X100 0.02836 0.0281 50.5 1.010 0.3174
## exchange - bottom X100 -0.02879 0.0281 50.5 -1.025 0.3102
## top - bottom X100 -0.05715 0.0281 50.5 -2.035 0.0471
## intact - exchange X200 -0.01006 0.0281 50.5 -0.358 0.7218
## intact - top X200 0.01923 0.0281 50.5 0.685 0.4967
## intact - bottom X200 -0.03718 0.0281 50.5 -1.324 0.1915
## exchange - top X200 0.02928 0.0281 50.5 1.043 0.3021
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E2_lFFA2_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange English - Chinese X50 0.0413 0.0702 47.1 0.588 0.5593
## intact - exchange English - Chinese X100 0.0350 0.0702 47.1 0.498 0.6206
## intact - exchange English - Chinese X200 0.0311 0.0702 47.1 0.443 0.6597
## intact - exchange English - Chinese X300 0.0233 0.0702 47.1 0.332 0.7412
contrast(emmeans(anova_E2_lFFA2_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange English X50 0.0192 0.045 91.6 0.427 0.6705
## intact - exchange Chinese X50 -0.0221 0.045 91.6 -0.492 0.6242
## intact - exchange English X100 0.0117 0.045 91.6 0.260 0.7957
## intact - exchange Chinese X100 -0.0233 0.045 91.6 -0.519 0.6053
## intact - exchange English X200 0.0055 0.045 91.6 0.122 0.9029
## intact - exchange Chinese X200 -0.0256 0.045 91.6 -0.570 0.5703
## intact - exchange English X300 -0.0022 0.045 91.6 -0.049 0.9611
## intact - exchange Chinese X300 -0.0255 0.045 91.6 -0.568 0.5716
anova_E2_rFFA2 <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_FFA2, Label == label_FFA2[[2]]))
anova_E2_rFFA2
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 17 0.05 0.00 <.001 .993
## 2 Layout 2.55, 43.43 0.01 0.23 <.001 .845
## 3 FaceWord:Layout 2.28, 38.70 0.02 0.72 .005 .512
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E2_rFFA2 <- emmeans(anova_E2_rFFA2, ~ FaceWord * Layout)
emm_aov_E2_rFFA2 %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E2_rFFA2, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese 0.000317 0.0355 17 0.009 0.9930
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E2_rFFA2, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.01582 0.0232 51 0.682 0.9034
## intact - partA -0.00143 0.0232 51 -0.062 0.9999
## intact - partB 0.00305 0.0232 51 0.131 0.9992
## exchange - partA -0.01725 0.0232 51 -0.744 0.8789
## exchange - partB -0.01277 0.0232 51 -0.551 0.9459
## partA - partB 0.00447 0.0232 51 0.193 0.9974
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E2_rFFA2 <- contrast(emm_aov_E2_rFFA2, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_anova_E2, interaction = "pairwise") # , adjust = "none"
contr_aov_E2_rFFA2
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese 0.04175 0.0529 56.1 0.789 0.4335
## exchange . English - Chinese -0.00244 0.0529 56.1 -0.046 0.9634
## partA . English - Chinese -0.05021 0.0529 56.1 -0.949 0.3468
## partB . English - Chinese 0.01216 0.0529 56.1 0.230 0.8190
## . English intact - exchange 0.03791 0.0396 92.9 0.958 0.3403
## . English intact - partA 0.04455 0.0396 92.9 1.126 0.2630
## . English intact - partB 0.01784 0.0396 92.9 0.451 0.6531
## . English exchange - partA 0.00664 0.0396 92.9 0.168 0.8671
## . English exchange - partB -0.02007 0.0396 92.9 -0.507 0.6130
## . English partA - partB -0.02671 0.0396 92.9 -0.675 0.5012
## . Chinese intact - exchange -0.00628 0.0396 92.9 -0.159 0.8743
## . Chinese intact - partA -0.04741 0.0396 92.9 -1.198 0.2338
## . Chinese intact - partB -0.01175 0.0396 92.9 -0.297 0.7672
## . Chinese exchange - partA -0.04113 0.0396 92.9 -1.040 0.3011
## . Chinese exchange - partB -0.00547 0.0396 92.9 -0.138 0.8903
## . Chinese partA - partB 0.03566 0.0396 92.9 0.901 0.3697
anova_E2_rFFA2_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_FFA2,
Label == label_FFA2[[2]],
Layout %in% c("intact", "exchange")))
anova(anova_E2_rFFA2_ie, "pes")
contrast(emmeans(anova_E2_rFFA2_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese 0.0197 0.0472 17 0.416 0.6824
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_rFFA2_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.0158 0.0277 17 0.570 0.5758
##
## Results are averaged over the levels of: FaceWord
emm_E2_rFFA2_ie <- emmeans(anova_E2_rFFA2_ie, ~ FaceWord + Layout)
contrast(emm_E2_rFFA2_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese intact - exchange 0.0442 0.0602 17 0.735 0.4726
(simple_E2_rFFA2_ie <- pairs(emm_E2_rFFA2_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese 0.04175 0.0560 28.9 0.746 0.4619
## exchange . English - Chinese -0.00244 0.0560 28.9 -0.044 0.9656
## . English intact - exchange 0.03791 0.0409 33.8 0.927 0.3607
## . Chinese intact - exchange -0.00628 0.0409 33.8 -0.153 0.8790
2(English words vs. Chinese characters) \(\times\) 2(top vs. bottom) ANOVA
anova_E2_rFFA2_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_FFA2,
Label == label_FFA2[[2]],
Layout %in% c("partA", "partB")))
anova(anova_E2_rFFA2_tb, "pes")
contrast(emmeans(anova_E2_rFFA2_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese -0.019 0.033 17 -0.577 0.5717
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_rFFA2_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## partA - partB 0.00447 0.0197 17 0.227 0.8235
##
## Results are averaged over the levels of: FaceWord
emm_E2_rFFA2_tb <- emmeans(anova_E2_rFFA2_tb, ~ FaceWord + Layout)
contrast(emm_E2_rFFA2_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese partA - partB -0.0624 0.0742 17 -0.840 0.4125
(simple_E2_rFFA2_tb <- pairs(emm_E2_rFFA2_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## partA . English - Chinese -0.0502 0.0497 33.5 -1.011 0.3192
## partB . English - Chinese 0.0122 0.0497 33.5 0.245 0.8080
## . English partA - partB -0.0267 0.0420 25.9 -0.635 0.5308
## . Chinese partA - partB 0.0357 0.0420 25.9 0.848 0.4042
anova_E2_rFFA2_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E2 %>%
filter(grepl("rh.f-vs-o.ffa2", Label)))
anova_E2_rFFA2_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 18 0.13 0.23 .001 .634
## 2 Layout 2.73, 49.11 0.03 0.79 .003 .497
## 3 Area 1.07, 19.26 0.04 1.93 .003 .181
## 4 FaceWord:Layout 2.38, 42.76 0.07 1.05 .007 .367
## 5 FaceWord:Area 1.06, 19.03 0.00 6.09 * .001 .022
## 6 Layout:Area 2.54, 45.70 0.00 1.62 <.001 .204
## 7 FaceWord:Layout:Area 3.00, 53.99 0.00 0.42 <.001 .742
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E2_rFFA2_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## English - Chinese X50 0.00330 0.0301 19.4 0.110 0.9137
## English - Chinese X100 -0.00591 0.0301 19.4 -0.197 0.8463
## English - Chinese X200 -0.02001 0.0301 19.4 -0.666 0.5135
## English - Chinese X300 -0.03454 0.0301 19.4 -1.149 0.2644
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_rFFA2_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 0.01864 0.0208 57.8 0.898 0.3729
## intact - top X50 -0.02067 0.0208 57.8 -0.996 0.3235
## intact - bottom X50 0.00773 0.0208 57.8 0.372 0.7109
## exchange - top X50 -0.03930 0.0208 57.8 -1.894 0.0632
## exchange - bottom X50 -0.01091 0.0208 57.8 -0.526 0.6012
## top - bottom X50 0.02840 0.0208 57.8 1.368 0.1765
## intact - exchange X100 0.01889 0.0208 57.8 0.910 0.3665
## intact - top X100 -0.01637 0.0208 57.8 -0.789 0.4335
## intact - bottom X100 0.00583 0.0208 57.8 0.281 0.7796
## exchange - top X100 -0.03526 0.0208 57.8 -1.699 0.0947
## exchange - bottom X100 -0.01305 0.0208 57.8 -0.629 0.5318
## top - bottom X100 0.02220 0.0208 57.8 1.070 0.2891
## intact - exchange X200 0.01573 0.0208 57.8 0.758 0.4514
## intact - top X200 -0.01154 0.0208 57.8 -0.556 0.5802
## intact - bottom X200 0.00180 0.0208 57.8 0.087 0.9310
## exchange - top X200 -0.02728 0.0208 57.8 -1.314 0.1939
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E2_rFFA2_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange English - Chinese X50 0.0331 0.0559 56.2 0.591 0.5567
## intact - exchange English - Chinese X100 0.0427 0.0559 56.2 0.764 0.4483
## intact - exchange English - Chinese X200 0.0453 0.0559 56.2 0.810 0.4211
## intact - exchange English - Chinese X300 0.0415 0.0559 56.2 0.742 0.4610
contrast(emmeans(anova_E2_rFFA2_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange English X50 0.03517 0.0348 104 1.010 0.3148
## intact - exchange Chinese X50 0.00211 0.0348 104 0.061 0.9519
## intact - exchange English X100 0.04023 0.0348 104 1.156 0.2505
## intact - exchange Chinese X100 -0.00246 0.0348 104 -0.071 0.9439
## intact - exchange English X200 0.03839 0.0348 104 1.103 0.2727
## intact - exchange Chinese X200 -0.00692 0.0348 104 -0.199 0.8429
## intact - exchange English X300 0.03492 0.0348 104 1.003 0.3181
## intact - exchange Chinese X300 -0.00657 0.0348 104 -0.189 0.8506
# add the column of Hemisphere
nRow_E2 <-nrow(as.data.frame(emm_aov_E2_lFFA2))
Hemisphere <- c(rep("left", nRow_E2), rep("right", nRow_E2))
desp_uni_E2_FFA2 <- cbind(Hemisphere, rbind(as.data.frame(emm_aov_E2_lFFA2), as.data.frame(emm_aov_E2_rFFA2)))
plot_uni_E2_FFA2 <- plot_uni(desp_uni_E2_FFA2, contr_aov_E2_lFFA2, contr_aov_E2_rFFA2, "FFA2")
# ggsave('plot_uni_E2_FFA2.png', plot_uni_E2_FFA2, width = 10, height = 10)
plot_uni_E2_FFA2
The above figure shows the neural respones (beta values) in FFA2 for each condition. The numbers are the p-values for the tests of differences between intact vs. exchange in that condition. Error bars represent 95% confidence intervals. Note: “*p<0.1;**p<0.05;***p<0.01”
# add the column of Hemisphere
nRow_E2 <-nrow(as.data.frame(emm_E2_lFFA2_ie))
Hemisphere <- c(rep("left", nRow_E2), rep("right", nRow_E2))
desp_uni_E2_FFA2_ie <- cbind(Hemisphere, rbind(as.data.frame(emm_E2_lFFA2_ie), as.data.frame(emm_E2_rFFA2_ie)))
plot_uni_E2_FFA2_ie <- plot_uni(desp_uni_E2_FFA2_ie, simple_E2_lFFA2_ie, simple_E2_rFFA2_ie, "FFA2", F)
# ggsave('plot_uni_E2_FFA2_ie.png', plot_uni_E2_FFA2_ie, width = 10, height = 5)
plot_uni_E2_FFA2_ie
# add the column of Hemisphere
nRow_E2 <-nrow(as.data.frame(emm_E2_lFFA2_tb))
Hemisphere <- c(rep("left", nRow_E2), rep("right", nRow_E2))
desp_uni_E2_FFA2_tb <- cbind(Hemisphere, rbind(as.data.frame(emm_E2_lFFA2_tb), as.data.frame(emm_E2_rFFA2_tb)))
plot_uni_E2_FFA2_tb <- plot_uni(desp_uni_E2_FFA2_tb, simple_E2_lFFA2_tb, simple_E2_rFFA2_tb, "FFA2", F, T)
# ggsave('plot_uni_E2_FFA2_tb.png', plot_uni_E2_FFA2_tb, width = 10, height = 5)
plot_uni_E2_FFA2_tb
# one-sample for results of decode E2 FFA2
one_decode_agg_E2_FFA2 <- {
df_decode_E2_FFA2 %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E2)) %>%
group_by(Hemisphere, ClassifyPair) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_agg_E2_FFA2
plot_decode_E2_FFA2 <- plot_decode(one_decode_agg_E2_FFA2, "FFA2")
# ggsave('plot_decode_E2_FFA2.png', plot_decode_E2_FFA2, width = 6.5, height = 16)
plot_decode_E2_FFA2
The above figure shows the decoding accuracy in FFA2 for each pair. The numbers are the p-values for the one-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals. Note: “*p<0.1;**p<0.05;***p<0.01”
# one-sample for results of decode E2 FFA2
one_decode_area_agg_E2_FFA2 <- {
df_decode_area_acc_E2 %>%
filter(grepl("f-vs-o.ffa2", Label)) %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1),
Area = as.numeric(str_extract(Label, "\\d*0"))) %>%
group_by(Hemisphere, ClassifyPair, Area) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_area_agg_E2_FFA2
lFFA2 can decode English intact vs. exchange (300mm^2).
# Similarity of top + bottom to intact vs. exchange in FFA
one_simi_E2_FFA2 <- {
df_simi_E2_FFA2 %>%
group_by(Hemisphere, Combination) %>%
summarize(mean = t.test(RateAsExchange, mu = 0.5)[[5]],
SE = t.test(RateAsExchange, mu = 0.5)[[7]],
cohens_d = (mean-0.5)/sd(RateAsExchange),
t = t.test(RateAsExchange, mu = 0.5)[[1]],
df = t.test(RateAsExchange, mu = 0.5)[[2]],
p = round(t.test(RateAsExchange, mu = 0.5)[[3]], 5),
lower.CL = t.test(RateAsExchange, mu = 0.5)[[4]][1],
upper.CL = t.test(RateAsExchange, mu = 0.5)[[4]][2],
nullValue = t.test(RateAsExchange, mu = 0.5)[[6]],
alternative = t.test(RateAsExchange, mu = 0.5)[[8]]
)
}
one_simi_E2_FFA2
plot_simi_E2_FFA2 <- plot_simi(one_simi_E2_FFA2, "FFA2")
# ggsave('plot_simi_E2_FFA2.png', plot_simi_E2_FFA2, width = 8, height = 10)
plot_simi_E2_FFA2
The above figure shows the probability of top+bottom being decoded as exchange conditions in FFA2. Patterns of top and bottom were combined with different weights, i.e., “face_top0.25-face_bottom0.75” denotes the linear combinations of face_top and face_bottom with the weights of 0.25/0.75. The numbers are the p-values for the two-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals.
# only keep data for these two labels
df_uni_E2_VWFA <- filter(df_clean_uni_E2, Label %in% label_VWFA)
df_decode_E2_VWFA <- filter(df_decode_acc_E2, Label %in% label_VWFA)
df_simi_E2_VWFA <- filter(df_rate_simi_E2, Label %in% label_VWFA)
# subjects used for each hemisphere
# unique(as.character((df_univar_agg_E2_VWFA %>% filter(Label == label_VWFA_E2))$SubjCode))
df_uni_E2_VWFA %>%
select(Hemisphere, Label, SessCode) %>%
distinct() %>%
group_by(Hemisphere, Label) %>%
summarize(Count = n())
anova_E2_VWFA <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_VWFA, Label == label_VWFA))
anova_E2_VWFA
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 13 0.26 66.19 *** .352 <.001
## 2 Layout 2.25, 29.19 0.03 10.51 *** .018 <.001
## 3 FaceWord:Layout 1.62, 21.06 0.06 9.23 ** .026 .002
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E2_VWFA <- emmeans(anova_E2_VWFA, ~ FaceWord * Layout)
emm_aov_E2_VWFA %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E2_VWFA, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese 0.786 0.0966 13 8.135 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E2_VWFA, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange -0.1739 0.0366 39 -4.748 0.0002
## intact - partA -0.0150 0.0366 39 -0.411 0.9763
## intact - partB -0.1217 0.0366 39 -3.323 0.0101
## exchange - partA 0.1588 0.0366 39 4.337 0.0006
## exchange - partB 0.0522 0.0366 39 1.425 0.4917
## partA - partB -0.1066 0.0366 39 -2.912 0.0289
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E2_VWFA <- contrast(emm_aov_E2_VWFA, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_aov_E2, interaction = "pairwise") # , adjust = "none"
contr_aov_E2_VWFA
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese 0.7486 0.1124 22.9 6.662 <.0001
## exchange . English - Chinese 0.9659 0.1124 22.9 8.596 <.0001
## partA . English - Chinese 0.5173 0.1124 22.9 4.604 0.0001
## partB . English - Chinese 0.9114 0.1124 22.9 8.111 <.0001
## . English intact - exchange -0.2825 0.0595 73.7 -4.749 <.0001
## . English intact - partA 0.1006 0.0595 73.7 1.692 0.0950
## . English intact - partB -0.2031 0.0595 73.7 -3.414 0.0010
## . English exchange - partA 0.3831 0.0595 73.7 6.441 <.0001
## . English exchange - partB 0.0794 0.0595 73.7 1.335 0.1859
## . English partA - partB -0.3037 0.0595 73.7 -5.106 <.0001
## . Chinese intact - exchange -0.0652 0.0595 73.7 -1.096 0.2766
## . Chinese intact - partA -0.1307 0.0595 73.7 -2.197 0.0312
## . Chinese intact - partB -0.0403 0.0595 73.7 -0.677 0.5006
## . Chinese exchange - partA -0.0655 0.0595 73.7 -1.101 0.2746
## . Chinese exchange - partB 0.0249 0.0595 73.7 0.419 0.6762
## . Chinese partA - partB 0.0904 0.0595 73.7 1.520 0.1328
2(English words vs. Chinese characters) \(\times\) 2(intact vs. exchange) ANOVA
anova_E2_VWFA_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_VWFA,
Label == label_VWFA[[1]],
Layout %in% c("intact", "exchange")))
anova(anova_E2_VWFA_ie, "pes")
contrast(emmeans(anova_E2_VWFA_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese 0.857 0.106 13 8.115 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_VWFA_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange -0.174 0.0398 13 -4.369 0.0008
##
## Results are averaged over the levels of: FaceWord
emm_E2_VWFA_ie <- emmeans(anova_E2_VWFA_ie, ~ FaceWord + Layout)
contrast(emm_E2_VWFA_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese intact - exchange -0.217 0.0964 13 -2.255 0.0420
(simple_E2_VWFA_ie <- pairs(emm_E2_VWFA_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese 0.7486 0.1161 18.2 6.448 <.0001
## exchange . English - Chinese 0.9659 0.1161 18.2 8.319 <.0001
## . English intact - exchange -0.2825 0.0625 25.1 -4.521 0.0001
## . Chinese intact - exchange -0.0652 0.0625 25.1 -1.043 0.3067
2(English words vs. Chinese characters) \(\times\) 2(top vs. bottom) ANOVA
anova_E2_VWFA_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_VWFA,
Label == label_VWFA[[1]],
Layout %in% c("partA", "partB")))
anova(anova_E2_VWFA_tb, "pes")
contrast(emmeans(anova_E2_VWFA_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese 0.714 0.091 13 7.848 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_VWFA_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## partA - partB -0.107 0.0363 13 -2.939 0.0115
##
## Results are averaged over the levels of: FaceWord
emm_E2_VWFA_tb <- emmeans(anova_E2_VWFA_tb, ~ FaceWord + Layout)
contrast(emm_E2_VWFA_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese partA - partB -0.394 0.118 13 -3.338 0.0053
(simple_E2_VWFA_tb <- pairs(emm_E2_VWFA_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## partA . English - Chinese 0.5173 0.1085 22.3 4.768 0.0001
## partB . English - Chinese 0.9114 0.1085 22.3 8.401 <.0001
## . English partA - partB -0.3037 0.0693 21.6 -4.383 0.0002
## . Chinese partA - partB 0.0904 0.0693 21.6 1.305 0.2057
anova_E2_VWFA_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E2 %>%
filter(grepl("lh.word-vs-face-object-scrambled", Label)))
anova_E2_VWFA_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 14 0.92 72.27 *** .356 <.001
## 2 Layout 2.45, 34.33 0.08 10.80 *** .018 <.001
## 3 Area 1.04, 14.62 0.10 8.50 * .007 .010
## 4 FaceWord:Layout 1.71, 23.93 0.18 13.44 *** .033 <.001
## 5 FaceWord:Area 1.05, 14.68 0.03 42.25 *** .009 <.001
## 6 Layout:Area 2.81, 39.34 0.00 5.30 ** <.001 .004
## 7 FaceWord:Layout:Area 2.52, 35.22 0.00 5.28 ** <.001 .006
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E2_VWFA_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## English - Chinese X50 0.869 0.089 14.8 9.765 <.0001
## English - Chinese X100 0.802 0.089 14.8 9.010 <.0001
## English - Chinese X200 0.696 0.089 14.8 7.819 <.0001
## English - Chinese X300 0.617 0.089 14.8 6.932 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_VWFA_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 -0.1812 0.0343 45.2 -5.286 <.0001
## intact - top X50 -0.0286 0.0343 45.2 -0.834 0.4086
## intact - bottom X50 -0.1507 0.0343 45.2 -4.394 0.0001
## exchange - top X50 0.1526 0.0343 45.2 4.452 0.0001
## exchange - bottom X50 0.0306 0.0343 45.2 0.892 0.3772
## top - bottom X50 -0.1221 0.0343 45.2 -3.560 0.0009
## intact - exchange X100 -0.1700 0.0343 45.2 -4.958 <.0001
## intact - top X100 -0.0335 0.0343 45.2 -0.977 0.3339
## intact - bottom X100 -0.1481 0.0343 45.2 -4.318 0.0001
## exchange - top X100 0.1365 0.0343 45.2 3.981 0.0002
## exchange - bottom X100 0.0219 0.0343 45.2 0.640 0.5254
## top - bottom X100 -0.1146 0.0343 45.2 -3.341 0.0017
## intact - exchange X200 -0.1498 0.0343 45.2 -4.369 0.0001
## intact - top X200 -0.0419 0.0343 45.2 -1.222 0.2280
## intact - bottom X200 -0.1417 0.0343 45.2 -4.133 0.0002
## exchange - top X200 0.1079 0.0343 45.2 3.147 0.0029
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E2_VWFA_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange English - Chinese X50 -0.248 0.0837 44.7 -2.966 0.0048
## intact - exchange English - Chinese X100 -0.233 0.0837 44.7 -2.789 0.0077
## intact - exchange English - Chinese X200 -0.220 0.0837 44.7 -2.625 0.0118
## intact - exchange English - Chinese X300 -0.204 0.0837 44.7 -2.439 0.0188
contrast(emmeans(anova_E2_VWFA_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange English X50 -0.3053 0.0541 86.3 -5.645 <.0001
## intact - exchange Chinese X50 -0.0572 0.0541 86.3 -1.057 0.2935
## intact - exchange English X100 -0.2867 0.0541 86.3 -5.300 <.0001
## intact - exchange Chinese X100 -0.0533 0.0541 86.3 -0.986 0.3270
## intact - exchange English X200 -0.2596 0.0541 86.3 -4.800 <.0001
## intact - exchange Chinese X200 -0.0400 0.0541 86.3 -0.739 0.4617
## intact - exchange English X300 -0.2345 0.0541 86.3 -4.335 <.0001
## intact - exchange Chinese X300 -0.0304 0.0541 86.3 -0.562 0.5752
nRow_E2 <-nrow(as.data.frame(emm_aov_E2_VWFA))
Hemisphere <- c(rep("left", nRow_E2))
desp_uni_E2_VWFA <- cbind(Hemisphere, as.data.frame(emm_aov_E2_VWFA))
plot_uni_E2_VWFA <- plot_uni_vwfa(desp_uni_E2_VWFA, contr_aov_E2_VWFA, "VWFA")
# ggsave('plot_uni_E2_VWFA.png', plot_uni_E2_VWFA, width = 5.5, height = 10)
plot_uni_E2_VWFA
The above figure shows the neural respones (beta values) in VWFA for each condition. The numbers are the p-values for the tests of differences between intact vs. exchange in that condition. Error bars represent 95% confidence intervals. Note: *, p < .05
nRow_E2 <-nrow(as.data.frame(emm_E2_VWFA_ie))
Hemisphere <- c(rep("left", nRow_E2))
desp_uni_E2_VWFA_ie <- cbind(Hemisphere, as.data.frame(emm_E2_VWFA_ie))
plot_uni_E2_VWFA_ie <- plot_uni_vwfa(desp_uni_E2_VWFA_ie, simple_E2_VWFA_tb, "VWFA", FALSE)
# ggsave('plot_uni_E2_VWFA_ie.png', plot_uni_E2_VWFA_ie, width = 5.5, height = 10)
plot_uni_E2_VWFA_ie
nRow_E2 <-nrow(as.data.frame(emm_E2_VWFA_tb))
Hemisphere <- c(rep("left", nRow_E2))
desp_uni_E2_VWFA_tb <- cbind(Hemisphere, as.data.frame(emm_E2_VWFA_tb))
plot_uni_E2_VWFA_tb <- plot_uni_vwfa(desp_uni_E2_VWFA_tb, simple_E2_VWFA_tb, "VWFA", FALSE, T)
# ggsave('plot_uni_E2_VWFA_tb.png', plot_uni_E2_VWFA_tb, width = 5.5, height = 10)
plot_uni_E2_VWFA_tb
# one-sample for results of decode E2 VWFA
one_decode_agg_E2_VWFA <- {
df_decode_E2_VWFA %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E2)) %>%
group_by(Hemisphere, ClassifyPair) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_agg_E2_VWFA
plot_decode_E2_VWFA <- plot_decode_vwfa(one_decode_agg_E2_VWFA, "VWFA")
# ggsave('plot_decode_E2_VWFA.png', plot_decode_E2_VWFA, width = 4, height = 16)
plot_decode_E2_VWFA
The above figure shows the decoding accuracy in VWFA for each pair. The numbers are the p-values for the one-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals. Note: ***, p <.001
# one-sample for results of decode E2 VWFA
one_decode_area_agg_E2_VWFA <- {
df_decode_area_acc_E2 %>%
filter(grepl("lh.word-vs-face-object-scrambled", Label)) %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1),
Area = as.numeric(str_extract(Label, "\\d*0"))) %>%
group_by(Hemisphere, ClassifyPair, Area) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_area_agg_E2_VWFA
VWFA can decode English intact vs. exchanged (50, 200, 300mm^2).
# Similarity of top + bottom to intact vs. exchange in VWFA
one_simi_E2_VWFA <- {
df_simi_E2_VWFA %>%
group_by(Hemisphere, Combination) %>%
summarize(mean = t.test(RateAsExchange, mu = 0.5)[[5]],
SE = t.test(RateAsExchange, mu = 0.5)[[7]],
cohens_d = (mean-0.5)/sd(RateAsExchange),
t = t.test(RateAsExchange, mu = 0.5)[[1]],
df = t.test(RateAsExchange, mu = 0.5)[[2]],
p = round(t.test(RateAsExchange, mu = 0.5)[[3]], 5),
lower.CL = t.test(RateAsExchange, mu = 0.5)[[4]][1],
upper.CL = t.test(RateAsExchange, mu = 0.5)[[4]][2],
nullValue = t.test(RateAsExchange, mu = 0.5)[[6]],
alternative = t.test(RateAsExchange, mu = 0.5)[[8]]
)
}
one_simi_E2_VWFA
plot_simi_E2_VWFA <- plot_simi_vwfa(one_simi_E2_VWFA, "VWFA")
# ggsave('plot_simi_E2_VWFA.png', plot_simi_E2_VWFA, width = 4.25, height = 10)
plot_simi_E2_VWFA
The above figure shows the probability of top+bottom being decoded as exchange conditions in VWFA. Patterns of top and bottom were combined with different weights, i.e., “face_top0.25-face_bottom0.75” denotes the linear combinations of face_top and face_bottom with the weights of 0.25/0.75. The numbers are the p-values for the two-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals.
# only keep data for these two labels
df_uni_E2_LO <- filter(df_clean_uni_E2, Label %in% label_LO)
df_decode_E2_LO <- filter(df_decode_acc_E2, Label %in% label_LO)
df_simi_E2_LO <- filter(df_rate_simi_E2, Label %in% label_LO)
df_uni_E2_LO %>%
select(Hemisphere, Label, SessCode) %>%
distinct() %>%
group_by(Hemisphere, Label) %>%
summarize(Count = n())
anova_E2_lLO <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_LO, Label == label_LO[[1]]))
anova_E2_lLO
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 15 0.19 4.52 + .014 .051
## 2 Layout 1.75, 26.31 0.05 1.33 .002 .279
## 3 FaceWord:Layout 2.06, 30.90 0.07 1.75 .004 .190
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E2_lLO <- emmeans(anova_E2_lLO, ~ FaceWord * Layout)
emm_aov_E2_lLO %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E2_lLO, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese -0.163 0.0768 15 -2.126 0.0506
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E2_lLO, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange -0.05319 0.0414 45 -1.284 0.5779
## intact - partA -0.08137 0.0414 45 -1.964 0.2170
## intact - partB -0.04894 0.0414 45 -1.181 0.6419
## exchange - partA -0.02818 0.0414 45 -0.680 0.9042
## exchange - partB 0.00426 0.0414 45 0.103 0.9996
## partA - partB 0.03244 0.0414 45 0.783 0.8619
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E2_lLO <- contrast(emm_aov_E2_lLO, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_aov_E2, interaction = "pairwise") # , adjust = "none"
contr_aov_E2_lLO
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese -0.1079 0.1006 37.8 -1.073 0.2903
## exchange . English - Chinese -0.0773 0.1006 37.8 -0.768 0.4470
## partA . English - Chinese -0.3014 0.1006 37.8 -2.996 0.0048
## partB . English - Chinese -0.1661 0.1006 37.8 -1.651 0.1070
## . English intact - exchange -0.0685 0.0673 85.0 -1.017 0.3120
## . English intact - partA 0.0154 0.0673 85.0 0.228 0.8201
## . English intact - partB -0.0198 0.0673 85.0 -0.295 0.7691
## . English exchange - partA 0.0838 0.0673 85.0 1.245 0.2164
## . English exchange - partB 0.0487 0.0673 85.0 0.723 0.4719
## . English partA - partB -0.0352 0.0673 85.0 -0.523 0.6025
## . Chinese intact - exchange -0.0379 0.0673 85.0 -0.563 0.5750
## . Chinese intact - partA -0.1781 0.0673 85.0 -2.645 0.0097
## . Chinese intact - partB -0.0780 0.0673 85.0 -1.159 0.2497
## . Chinese exchange - partA -0.1402 0.0673 85.0 -2.082 0.0403
## . Chinese exchange - partB -0.0401 0.0673 85.0 -0.596 0.5527
## . Chinese partA - partB 0.1001 0.0673 85.0 1.486 0.1409
2(English words vs. Chinese characters) \(\times\) 2(intact vs. exchange) ANOVA
anova_E2_lLO_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_LO,
Label == label_LO[[1]],
Layout %in% c("intact", "exchange")))
anova(anova_E2_lLO_ie, "pes")
contrast(emmeans(anova_E2_lLO_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese -0.0926 0.087 15 -1.064 0.3043
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_lLO_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange -0.0532 0.0601 15 -0.885 0.3900
##
## Results are averaged over the levels of: FaceWord
emm_E2_lLO_ie <- emmeans(anova_E2_lLO_ie, ~ FaceWord + Layout)
contrast(emm_E2_lLO_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese intact - exchange -0.0306 0.0818 15 -0.374 0.7139
(simple_E2_lLO_ie <- pairs(emm_E2_lLO_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese -0.1079 0.0962 21.3 -1.122 0.2745
## exchange . English - Chinese -0.0773 0.0962 21.3 -0.804 0.4305
## . English intact - exchange -0.0685 0.0727 26.4 -0.942 0.3547
## . Chinese intact - exchange -0.0379 0.0727 26.4 -0.521 0.6065
2(English words vs. Chinese characters) \(\times\) 2(top vs. bottom) ANOVA
anova_E2_lLO_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_LO,
Label == label_LO[[1]],
Layout %in% c("partA", "partB")))
anova(anova_E2_lLO_tb, "pes")
contrast(emmeans(anova_E2_lLO_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese -0.234 0.0781 15 -2.991 0.0091
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_lLO_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## partA - partB 0.0324 0.0272 15 1.191 0.2523
##
## Results are averaged over the levels of: FaceWord
emm_E2_lLO_tb <- emmeans(anova_E2_lLO_tb, ~ FaceWord + Layout)
contrast(emm_E2_lLO_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese partA - partB -0.135 0.14 15 -0.968 0.3482
(simple_E2_lLO_tb <- pairs(emm_E2_lLO_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## partA . English - Chinese -0.3014 0.105 29.6 -2.875 0.0074
## partB . English - Chinese -0.1661 0.105 29.6 -1.585 0.1236
## . English partA - partB -0.0352 0.075 19.5 -0.470 0.6439
## . Chinese partA - partB 0.1001 0.075 19.5 1.335 0.1973
anova_E2_lLO_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E2 %>%
filter(grepl("lh.o-vs-scr", Label)))
anova_E2_lLO_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 15 0.72 4.09 + .015 .061
## 2 Layout 1.87, 28.11 0.17 0.58 <.001 .556
## 3 Area 1.07, 16.05 0.30 2.59 .004 .126
## 4 FaceWord:Layout 2.00, 29.98 0.23 2.03 .005 .149
## 5 FaceWord:Area 1.09, 16.28 0.01 17.94 *** .001 <.001
## 6 Layout:Area 2.98, 44.66 0.00 2.15 <.001 .107
## 7 FaceWord:Layout:Area 2.61, 39.20 0.00 0.59 <.001 .602
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E2_lLO_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## English - Chinese X50 -0.203 0.0756 15.4 -2.681 0.0168
## English - Chinese X100 -0.173 0.0756 15.4 -2.294 0.0362
## English - Chinese X200 -0.128 0.0756 15.4 -1.689 0.1112
## English - Chinese X300 -0.103 0.0756 15.4 -1.363 0.1926
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_lLO_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 -0.04845 0.0413 46.9 -1.173 0.2468
## intact - top X50 -0.06845 0.0413 46.9 -1.657 0.1042
## intact - bottom X50 -0.04132 0.0413 46.9 -1.000 0.3223
## exchange - top X50 -0.02000 0.0413 46.9 -0.484 0.6305
## exchange - bottom X50 0.00713 0.0413 46.9 0.173 0.8637
## top - bottom X50 0.02713 0.0413 46.9 0.657 0.5145
## intact - exchange X100 -0.03948 0.0413 46.9 -0.956 0.3441
## intact - top X100 -0.05826 0.0413 46.9 -1.410 0.1650
## intact - bottom X100 -0.04070 0.0413 46.9 -0.985 0.3296
## exchange - top X100 -0.01878 0.0413 46.9 -0.455 0.6514
## exchange - bottom X100 -0.00121 0.0413 46.9 -0.029 0.9767
## top - bottom X100 0.01757 0.0413 46.9 0.425 0.6726
## intact - exchange X200 -0.03417 0.0413 46.9 -0.827 0.4122
## intact - top X200 -0.04488 0.0413 46.9 -1.087 0.2828
## intact - bottom X200 -0.03880 0.0413 46.9 -0.939 0.3524
## exchange - top X200 -0.01070 0.0413 46.9 -0.259 0.7966
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E2_lLO_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange English - Chinese X50 -0.00514 0.0978 46.1 -0.053 0.9583
## intact - exchange English - Chinese X100 0.01051 0.0978 46.1 0.107 0.9149
## intact - exchange English - Chinese X200 0.02342 0.0978 46.1 0.239 0.8118
## intact - exchange English - Chinese X300 0.02220 0.0978 46.1 0.227 0.8215
contrast(emmeans(anova_E2_lLO_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange English X50 -0.0510 0.064 90.2 -0.797 0.4276
## intact - exchange Chinese X50 -0.0459 0.064 90.2 -0.717 0.4755
## intact - exchange English X100 -0.0342 0.064 90.2 -0.535 0.5942
## intact - exchange Chinese X100 -0.0447 0.064 90.2 -0.699 0.4865
## intact - exchange English X200 -0.0225 0.064 90.2 -0.351 0.7265
## intact - exchange Chinese X200 -0.0459 0.064 90.2 -0.717 0.4754
## intact - exchange English X300 -0.0207 0.064 90.2 -0.323 0.7474
## intact - exchange Chinese X300 -0.0429 0.064 90.2 -0.670 0.5047
aov_E2_rLO <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_LO, Label == label_LO[[2]]))
aov_E2_rLO
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 16 0.15 44.67 *** .030 <.001
## 2 Layout 2.30, 36.79 0.07 3.03 + .002 .054
## 3 FaceWord:Layout 2.18, 34.93 0.04 1.05 <.001 .364
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
emm_aov_E2_rLO <- emmeans(aov_E2_rLO, ~ FaceWord * Layout)
emm_aov_E2_rLO %>%
as.data.frame() %>%
arrange(FaceWord)
Posthoc analysis for the main effects:
contrast(emmeans(emm_aov_E2_rLO, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese -0.438 0.0655 16 -6.684 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(emm_aov_E2_rLO, ~ Layout), "pairwise") # , adjust = "none"
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.08614 0.0568 48 1.516 0.4360
## intact - partA -0.08487 0.0568 48 -1.494 0.4491
## intact - partB -0.00697 0.0568 48 -0.123 0.9993
## exchange - partA -0.17101 0.0568 48 -3.010 0.0209
## exchange - partB -0.09311 0.0568 48 -1.639 0.3671
## partA - partB 0.07790 0.0568 48 1.371 0.5233
##
## Results are averaged over the levels of: FaceWord
## P value adjustment: tukey method for comparing a family of 4 estimates
Results of simple effect analysis (uncorrected):
contr_aov_E2_rLO <- contrast(emm_aov_E2_rLO, "pairwise", simple = "each", combine = TRUE, adjust = "none")
# contrast(emm_uni_aov_E2, interaction = "pairwise") # , adjust = "none"
contr_aov_E2_rLO
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese -0.3835 0.0837 37.6 -4.584 <.0001
## exchange . English - Chinese -0.5192 0.0837 37.6 -6.206 <.0001
## partA . English - Chinese -0.3966 0.0837 37.6 -4.741 <.0001
## partB . English - Chinese -0.4507 0.0837 37.6 -5.388 <.0001
## . English intact - exchange 0.1540 0.0710 88.9 2.170 0.0327
## . English intact - partA -0.0783 0.0710 88.9 -1.103 0.2729
## . English intact - partB 0.0267 0.0710 88.9 0.376 0.7081
## . English exchange - partA -0.2323 0.0710 88.9 -3.273 0.0015
## . English exchange - partB -0.1273 0.0710 88.9 -1.794 0.0762
## . English partA - partB 0.1050 0.0710 88.9 1.479 0.1427
## . Chinese intact - exchange 0.0183 0.0710 88.9 0.257 0.7975
## . Chinese intact - partA -0.0914 0.0710 88.9 -1.288 0.2010
## . Chinese intact - partB -0.0406 0.0710 88.9 -0.572 0.5687
## . Chinese exchange - partA -0.1097 0.0710 88.9 -1.546 0.1257
## . Chinese exchange - partB -0.0589 0.0710 88.9 -0.830 0.4090
## . Chinese partA - partB 0.0508 0.0710 88.9 0.716 0.4757
anova_E2_rLO_ie <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_LO,
Label == label_LO[[2]],
Layout %in% c("intact", "exchange")))
anova(anova_E2_rLO_ie, "pes")
contrast(emmeans(anova_E2_rLO_ie, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese -0.451 0.0719 16 -6.279 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_rLO_ie, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## intact - exchange 0.0861 0.0575 16 1.498 0.1535
##
## Results are averaged over the levels of: FaceWord
emm_E2_rLO_ie <- emmeans(anova_E2_rLO_ie, ~ FaceWord + Layout)
contrast(emm_E2_rLO_ie, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese intact - exchange 0.136 0.0839 16 1.617 0.1254
(simple_E2_rLO_ie <- pairs(emm_E2_rLO_ie, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## intact . English - Chinese -0.3835 0.0832 25.8 -4.607 0.0001
## exchange . English - Chinese -0.5192 0.0832 25.8 -6.238 <.0001
## . English intact - exchange 0.1540 0.0712 29.3 2.164 0.0388
## . Chinese intact - exchange 0.0183 0.0712 29.3 0.257 0.7993
2(English words vs. Chinese characters) \(\times\) 2(top vs. bottom) ANOVA
anova_E2_rLO_tb <- aov_4(Response ~ FaceWord * Layout + (FaceWord * Layout | SubjCode),
data = filter(df_uni_E2_LO,
Label == label_LO[[2]],
Layout %in% c("partA", "partB")))
anova(anova_E2_rLO_tb, "pes")
contrast(emmeans(anova_E2_rLO_tb, ~ FaceWord), "pairwise")
## contrast estimate SE df t.ratio p.value
## English - Chinese -0.424 0.0673 16 -6.293 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_rLO_tb, ~ Layout), "pairwise")
## contrast estimate SE df t.ratio p.value
## partA - partB 0.0779 0.0377 16 2.068 0.0552
##
## Results are averaged over the levels of: FaceWord
emm_E2_rLO_tb <- emmeans(anova_E2_rLO_tb, ~ FaceWord + Layout)
contrast(emm_E2_rLO_tb, interaction = "pairwise")
## FaceWord_pairwise Layout_pairwise estimate SE df t.ratio p.value
## English - Chinese partA - partB 0.0541 0.101 16 0.537 0.5984
(simple_E2_rLO_tb <- pairs(emm_E2_rLO_tb, simple = "each", combine = TRUE, adjust = "none"))
## Layout FaceWord contrast estimate SE df t.ratio p.value
## partA . English - Chinese -0.3966 0.0841 29.6 -4.717 0.0001
## partB . English - Chinese -0.4507 0.0841 29.6 -5.361 <.0001
## . English partA - partB 0.1050 0.0629 29.6 1.669 0.1056
## . Chinese partA - partB 0.0508 0.0629 29.6 0.808 0.4254
anova_E2_rLO_area <- aov_4(Response ~ FaceWord * Layout * Area + (FaceWord * Layout * Area | Subject),
data = df_clean_area_uni_E2 %>%
filter(grepl("rh.o-vs-scr", Label)))
anova_E2_rLO_area
## Anova Table (Type 3 tests)
##
## Response: Response
## Effect df MSE F ges p.value
## 1 FaceWord 1, 16 0.48 45.31 *** .033 <.001
## 2 Layout 2.27, 36.38 0.21 3.01 + .002 .056
## 3 Area 1.08, 17.24 0.53 0.03 <.001 .873
## 4 FaceWord:Layout 1.92, 30.73 0.18 1.03 <.001 .366
## 5 FaceWord:Area 1.08, 17.23 0.01 6.73 * <.001 .017
## 6 Layout:Area 2.28, 36.52 0.01 3.43 * <.001 .037
## 7 FaceWord:Layout:Area 2.79, 44.61 0.00 0.46 <.001 .700
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
##
## Sphericity correction method: GG
contrast(emmeans(anova_E2_rLO_area, ~ FaceWord | Area), "pairwise", adjust="none")[1:4]
## contrast Area estimate SE df t.ratio p.value
## English - Chinese X50 -0.432 0.0604 17 -7.152 <.0001
## English - Chinese X100 -0.418 0.0604 17 -6.925 <.0001
## English - Chinese X200 -0.389 0.0604 17 -6.444 <.0001
## English - Chinese X300 -0.363 0.0604 17 -6.011 <.0001
##
## Results are averaged over the levels of: Layout
contrast(emmeans(anova_E2_rLO_area, ~ Layout | Area), "pairwise", adjust="none")[1:16]
## contrast Area estimate SE df t.ratio p.value
## intact - exchange X50 0.09600 0.0486 50.7 1.974 0.0539
## intact - top X50 -0.07922 0.0486 50.7 -1.629 0.1096
## intact - bottom X50 0.00524 0.0486 50.7 0.108 0.9146
## exchange - top X50 -0.17522 0.0486 50.7 -3.602 0.0007
## exchange - bottom X50 -0.09076 0.0486 50.7 -1.866 0.0679
## top - bottom X50 0.08446 0.0486 50.7 1.737 0.0885
## intact - exchange X100 0.08008 0.0486 50.7 1.646 0.1059
## intact - top X100 -0.07942 0.0486 50.7 -1.633 0.1087
## intact - bottom X100 -0.00505 0.0486 50.7 -0.104 0.9177
## exchange - top X100 -0.15950 0.0486 50.7 -3.279 0.0019
## exchange - bottom X100 -0.08513 0.0486 50.7 -1.750 0.0861
## top - bottom X100 0.07437 0.0486 50.7 1.529 0.1325
## intact - exchange X200 0.06344 0.0486 50.7 1.304 0.1980
## intact - top X200 -0.06764 0.0486 50.7 -1.391 0.1704
## intact - bottom X200 -0.00804 0.0486 50.7 -0.165 0.8694
## exchange - top X200 -0.13108 0.0486 50.7 -2.695 0.0095
##
## Results are averaged over the levels of: FaceWord
contrast(emmeans(anova_E2_rLO_area, ~ Layout + FaceWord | Area), interaction="pairwise", adjust="none")[seq(1,24,6)]
## Layout_pairwise FaceWord_pairwise Area estimate SE df t.ratio p.value
## intact - exchange English - Chinese X50 0.135 0.0832 50.9 1.624 0.1106
## intact - exchange English - Chinese X100 0.127 0.0832 50.9 1.527 0.1330
## intact - exchange English - Chinese X200 0.113 0.0832 50.9 1.358 0.1804
## intact - exchange English - Chinese X300 0.106 0.0832 50.9 1.274 0.2083
contrast(emmeans(anova_E2_rLO_area, ~ Layout | FaceWord + Area), "pairwise", adjust="none")[seq(1,48,6)]
## contrast FaceWord Area estimate SE df t.ratio p.value
## intact - exchange English X50 0.16358 0.064 99.2 2.555 0.0121
## intact - exchange Chinese X50 0.02841 0.064 99.2 0.444 0.6581
## intact - exchange English X100 0.14362 0.064 99.2 2.243 0.0271
## intact - exchange Chinese X100 0.01653 0.064 99.2 0.258 0.7968
## intact - exchange English X200 0.11998 0.064 99.2 1.874 0.0639
## intact - exchange Chinese X200 0.00691 0.064 99.2 0.108 0.9143
## intact - exchange English X300 0.11348 0.064 99.2 1.773 0.0794
## intact - exchange Chinese X300 0.00739 0.064 99.2 0.116 0.9083
# add the column of Hemisphere
nRow_E2 <-nrow(as.data.frame(emm_aov_E2_lLO))
Hemisphere <- c(rep("left", nRow_E2), rep("right", nRow_E2))
desp_uni_E2_LO <- cbind(Hemisphere, rbind(as.data.frame(emm_aov_E2_lLO), as.data.frame(emm_aov_E2_rLO)))
plot_uni_E2_LO <- plot_uni(desp_uni_E2_LO, contr_aov_E2_lLO, contr_aov_E2_rLO, "LO")
# ggsave('plot_uni_E2_LO.png', plot_uni_E2_LO, width = 10, height = 10)
plot_uni_E2_LO
The above figure shows the neural respones (beta values) in LO for each condition. The numbers are the p-values for the tests of differences between intact vs. exchange in that condition. Error bars represent 95% confidence intervals. Note: *, p < .05
# add the column of Hemisphere
nRow_E2 <-nrow(as.data.frame(emm_E2_lLO_ie))
Hemisphere <- c(rep("left", nRow_E2), rep("right", nRow_E2))
desp_uni_E2_LO_ie <- cbind(Hemisphere, rbind(as.data.frame(emm_E2_lLO_ie), as.data.frame(emm_E2_rLO_ie)))
plot_uni_E2_LO_ie <- plot_uni(desp_uni_E2_LO_ie, simple_E2_lLO_ie, simple_E2_rLO_ie, "LO", F)
# ggsave('plot_uni_E2_LO_ie.png', plot_uni_E2_LO_ie, width = 10, height = 5)
plot_uni_E2_LO_ie
# add the column of Hemisphere
nRow_E2 <-nrow(as.data.frame(emm_E2_lLO_tb))
Hemisphere <- c(rep("left", nRow_E2), rep("right", nRow_E2))
desp_uni_E2_LO_tb <- cbind(Hemisphere, rbind(as.data.frame(emm_E2_lLO_tb), as.data.frame(emm_E2_rLO_tb)))
plot_uni_E2_LO_tb <- plot_uni(desp_uni_E2_LO_tb, simple_E2_lLO_tb, simple_E2_rLO_tb, "LO", F, T)
# ggsave('plot_uni_E2_LO_tb.png', plot_uni_E2_LO_tb, width = 10, height = 5)
plot_uni_E2_LO_tb
# one-sample for results of decode E2 LO
one_decode_agg_E2_LO <- {
df_decode_E2_LO %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E2)) %>%
group_by(Hemisphere, ClassifyPair) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_agg_E2_LO
plot_decode_E2_LO <- plot_decode(one_decode_agg_E2_LO, "LO")
# ggsave('plot_decode_E2_LO.png', plot_decode_E2_LO, width = 6.5, height = 16)
plot_decode_E2_LO
The above figure shows the decoding accuracy in LO for each pair. The numbers are the p-values for the one-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals. Note: , p < .01; *, p <.001
# one-sample for results of decode E2 LO
one_decode_area_agg_E2_lLO <- {
df_decode_area_acc_E2 %>%
filter(grepl("o-vs-scr", Label)) %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1),
Area = as.numeric(str_extract(Label, "\\d*0"))) %>%
group_by(Hemisphere, ClassifyPair, Area) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_area_agg_E2_lLO
# Similarity of top + bottom to intact vs. exchange in LO
one_simi_E2_LO <- {
df_simi_E2_LO %>%
group_by(Hemisphere, Combination) %>%
summarize(mean = t.test(RateAsExchange, mu = 0.5)[[5]],
SE = t.test(RateAsExchange, mu = 0.5)[[7]],
cohens_d = (mean-0.5)/sd(RateAsExchange),
t = t.test(RateAsExchange, mu = 0.5)[[1]],
df = t.test(RateAsExchange, mu = 0.5)[[2]],
p = round(t.test(RateAsExchange, mu = 0.5)[[3]], 5),
lower.CL = t.test(RateAsExchange, mu = 0.5)[[4]][1],
upper.CL = t.test(RateAsExchange, mu = 0.5)[[4]][2],
nullValue = t.test(RateAsExchange, mu = 0.5)[[6]],
alternative = t.test(RateAsExchange, mu = 0.5)[[8]]
)
}
one_simi_E2_LO
plot_simi_E2_LO <- plot_simi(one_simi_E2_LO, "LO")
# ggsave('plot_simi_E2_LO.png', plot_simi_E2_LO, width = 8, height = 10)
plot_simi_E2_LO
The above figure shows the probability of top+bottom being decoded as exchange conditions in LO. Patterns of top and bottom were combined with different weights, i.e., “face_top0.25-face_bottom0.75” denotes the linear combinations of face_top and face_bottom with the weights of 0.25/0.75. The numbers are the p-values for the two-tail one-sample t-tests against the chance level (0.5) in that condition. Error bars represent 95% confidence intervals.
Labels for LO were defined with the maximum area of 100, 150, 200 and 300 mm^2, respecitvely.
df_label_LO_E1 <- read_csv(file.path("data", "faceword_E1_Label_LO_HJ.csv")) %>%
mutate(roi = str_remove(Label, "roi."),
roi = str_remove(roi, ".label")) %>%
mutate(Subject = str_replace(SubjCode, "\\_.*", ""))
# df_label %>% head()
df_label_LO_E1 %>%
select(SubjCode, roi, Size) %>%
pivot_wider(names_from = roi, values_from = Size) %>%
arrange(SubjCode)
The above table displays the size (in mm2) of each label for each participant. (NA denotes that this label is not available for that particiapnt.)
df_label_LO_E1 %>%
select(SubjCode, roi, NVtxs) %>%
pivot_wider(names_from = roi, values_from = NVtxs) %>%
arrange(SubjCode)
The above table displays the number of vertices for each label and each participant. (NA denotes that this label is not available for that particiapnt.)
df_label_LO_E1 %>%
group_by(Label, roi) %>%
summarize(Count = n(),
meanSize = mean(Size),
meanNVtx = mean(NVtxs))
df_nlabel_LO_E1 <- df_label_LO_E1 %>%
filter(Size > nVtx_size_min) %>%
group_by(Label, roi) %>%
summarize(Count = n(),
meanSize = mean(Size),
meanNVtx = mean(NVtxs))
df_nlabel_LO_E1
The above table dispalys the number of participants included in the following analyses for each ROI. (VWFA is only found on the left hemisphere.)
# load decoding results in LO
df_LO_area_E1 <- read_csv(file.path("data", "faceword_E1_Decode_LO_noz.csv")) %>%
select(Label, SessCode, ClassifyPair, ACC) %>%
mutate(Hemisphere = if_else(grepl("lh", Label), "left",
if_else(grepl("rh", Label), "right", "NA")),
Subject = str_remove(SessCode, "\\_.*")) %>%
left_join(df_label_LO_E1, by = c("Label", "Subject")) %>%
filter(Size > nVtx_size_min)
df_decode_LO_acc_E1 <- df_LO_area_E1 %>%
group_by(Hemisphere, Label, SessCode, ClassifyPair) %>% # divide the data into groups by these columns
summarize(Accuracy = mean(ACC), Count = n()) %>%
ungroup()
df_decode_LO_acc_E1
# one-sample for results of decode E1 LO
one_decode_agg_E1_LO_area <- {
df_decode_LO_acc_E1 %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E1)) %>%
group_by(Hemisphere, ClassifyPair, Label) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_agg_E1_LO_area
df_label_LO_E2 <- read_csv(file.path("data", "faceword_E2_Label_LO_HJ.csv")) %>%
mutate(roi = str_remove(Label, "roi."),
roi = str_remove(roi, ".label")) %>%
mutate(Subject = str_replace(SubjCode, "\\_.*", ""))
# df_label %>% head()
df_label_LO_E2 %>%
select(SubjCode, roi, Size) %>%
pivot_wider(names_from = roi, values_from = Size) %>%
arrange(SubjCode)
The above table displays the size (in mm2) of each label for each participant. (NA denotes that this label is not available for that particiapnt.)
df_label_LO_E2 %>%
select(SubjCode, roi, NVtxs) %>%
pivot_wider(names_from = roi, values_from = NVtxs) %>%
arrange(SubjCode)
The above table displays the number of vertices for each label and each participant. (NA denotes that this label is not available for that particiapnt.)
df_label_LO_E2 %>%
group_by(Label, roi) %>%
summarize(Count = n(),
meanSize = mean(Size),
meanNVtx = mean(NVtxs))
df_nlabel_LO_E2 <- df_label_LO_E2 %>%
filter(Size > nVtx_size_min) %>%
group_by(Label, roi) %>%
summarize(Count = n(),
meanSize = mean(Size),
meanNVtx = mean(NVtxs))
df_nlabel_LO_E2
The above table dispalys the number of participants included in the following analyses for each ROI. (VWFA is only found on the left hemisphere.)
# load decoding results in LO
df_LO_area_E2 <- read_csv(file.path("data", "faceword_E2_Decode_LO_noz.csv")) %>%
select(Label, SessCode, ClassifyPair, ACC) %>%
mutate(Hemisphere = if_else(grepl("lh", Label), "left",
if_else(grepl("rh", Label), "right", "NA")),
Subject = str_remove(SessCode, "\\_.*"),
ClassifyPair = fct_recode(ClassifyPair,
`Chinese_partA-Chinese_partB` = "Chinese_top-Chinese_bottom",
`English_partA-English_partB` = "English_top-English_bottom"),
ClassifyPair = factor(ClassifyPair, levels = pair_order_E2)) %>%
left_join(df_label_LO_E2, by = c("Label", "Subject")) %>%
filter(Size > nVtx_size_min)
df_decode_LO_acc_E2 <- df_LO_area_E2 %>%
group_by(Hemisphere, Label, SessCode, ClassifyPair) %>% # divide the data into groups by these columns
summarize(Accuracy = mean(ACC), Count = n()) %>%
ungroup()
df_decode_LO_acc_E2
# one-sample for results of decode E2 LO
one_decode_agg_E2_LO_area <- {
df_decode_LO_acc_E2 %>%
mutate(ClassifyPair = fct_relevel(ClassifyPair, pair_order_E2)) %>%
group_by(Hemisphere, ClassifyPair, Label) %>%
summarize(mean = t.test(Accuracy, mu = 0.5, alternative = "greater")[[5]],
SE = t.test(Accuracy, mu = 0.5, alternative = "greater")[[7]],
cohens_d = (mean-0.5)/sd(Accuracy),
t = t.test(Accuracy, mu = 0.5, alternative = "greater")[[1]],
df = t.test(Accuracy, mu = 0.5, alternative = "greater")[[2]],
p = round(t.test(Accuracy, mu = 0.5, alternative = "greater")[[3]], 5),
lower.CL = t.test(Accuracy, mu = 0.5, alternative = "greater")[[4]][1],
upper.CL = mean * 2 - lower.CL, # t.test(Accuracy, mu = 0.5, alternative = "two.sided")[[4]][2],
nullValue = t.test(Accuracy, mu = 0.5, alternative = "greater")[[6]],
alternative = t.test(Accuracy, mu = 0.5, alternative = "greater")[[8]]
)
}
one_decode_agg_E2_LO_area
df_decode_LO_area <- rbind(mutate(one_decode_agg_E1_LO_area, Exp = "E1"),
mutate(one_decode_agg_E2_LO_area, Exp = "E2")) %>%
separate(ClassifyPair, c("Stimuli1", "Layout1", "Stimuli2", "Layout2")) %>%
filter(!(Label %in% c("roi.lh.o-vs-scr.label", "roi.rh.o-vs-scr.label"))) %>%
mutate(Stimuli1 = if_else(Stimuli1 %in% c("face", "word"), paste0(Stimuli1, "s"), Stimuli1),
Stimuli2 = if_else(Stimuli2 %in% c("face", "word"), paste0(Stimuli2, "s"), Stimuli2),
Stimuli = ifelse(Stimuli1 == Stimuli2, Stimuli1,
paste(Stimuli1, Stimuli2, sep = "\nvs.\n")),
Layout = ifelse(Layout1 == Layout2, Layout1,
paste(toTitleCase(Layout1), toTitleCase(Layout2), sep = "\nvs.\n")),
Area = substr(Label, 18, 20)) %>%
select(-c(Stimuli1, Stimuli2, Layout1, Layout2))
# save the df for intact English vs. intact Chinese
df_intact_LO_area <- filter(df_decode_LO_area, Layout == "intact") %>%
mutate(Stimuli = fct_rev(Stimuli))
dat_text_intact_LO_area <- data.frame(
Stimuli = c("faces\nvs.\nwords", "English\nvs.\nChinese"),
Hemisphere = c("left"),
label = c("Chinese speakers: \nfaces vs. Chinese characters",
"English speakers: \nEnglish words vs. Chinese characters"),
x = .5, # c(1.35, 1.6),
y = 1.05
)
# intact
plot_intact_LO_area <- ggplot(df_intact_LO_area, aes(y = mean, x = Area)) +
geom_col(position = "dodge", width = .5, fill = "#CDCDC8") +
facet_grid(Stimuli ~ Hemisphere, scales = "free_x", space = "free_x",
switch = "x",
labeller = labeller(Hemisphere = c(left = "left hemisphere", right = "right hemisphere"))) +
geom_errorbar(mapping = aes(ymin = lower.CL, ymax = upper.CL), linetype = 1, # set the error bar
show.legend = FALSE, width = 0.25, alpha = .5,
position = position_dodge(width=0.9)) +
geom_hline(yintercept = 0.5, linetype = 5, alpha = 0.5) + # add the line for 0.5 and 1 (y)
scale_y_continuous(expand= c(0, 0), breaks = seq(0, 1, .25)) + # remove the space between columns and x axis
coord_cartesian(ylim = c(0.4, 1.1)) +
labs(x = expression(paste("Lateral Occipital Label Area (", mm^2, ")")), y = "Accuracy") + # set the names for main, x and y axises
geom_text(aes(label = sig_ast(p)), size = 7, nudge_y = 0.15) + # add starts to the significant columns
# geom_text(aes(label = round(mean, 2)), size = 4, nudge_y = 0.2) +
geom_text(data = dat_text_intact_LO_area, aes(x = x, y = y, label = label), size = 4, fontface = "bold", hjust=0) + #
theme_bw() +
theme(
plot.title = element_text(lineheight=.8, face="bold", size = 24, hjust = 0.5, vjust = -1),
# plot.margin = margin(5, 170, 60, 40, unit = "pt"),
text = element_text(colour="black"),
axis.text = element_text(colour="black"),
axis.text.x = element_text(face = "bold", size = 16),
axis.text.y = element_text(size = 13),
axis.title.x = element_text(face = "bold", size = 20), # the size of the texts in plot
axis.title.y = element_text(size = 17, vjust = 2.5), # the size of the texts in plot
axis.line.x = element_line(colour = 'black', size=0.5, linetype='solid'),
axis.line.y = element_line(colour = 'black', size=0.5, linetype='solid'), # , arrow = arrow(length = unit(0.3, "cm"))
# axis.text.x = element_text(angle = 45, vjust = 0.5),
panel.border = element_blank(),
panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
panel.spacing = unit(1.5, "lines"),
# remove the facet background color
strip.text.x = element_text(size = 15),
strip.text.y = element_blank(),
strip.background = element_blank(),
strip.placement = "outside",
) +
NULL
# ggsave('plot_decode_LO_area_intact.pdf', plot_intact_LO_area, width = 8, height = 8)
plot_intact_LO_area
df_inex_LO_area <- df_decode_LO_area %>%
filter(str_detect(Stimuli, "vs.", negate = TRUE),
Layout == "Intact\nvs.\nExchange")
df_inex_LO_area$Stimuli <- fct_relevel(df_inex_LO_area$Stimuli, "English", after = Inf)
df_inex_LO_area$Stimuli <- fct_relevel(df_inex_LO_area$Stimuli, "Chinese", after = Inf)
dat_text_inex_LO_area <- data.frame(
Stimuli = levels(df_inex_LO_area$Stimuli),
Hemisphere = c("left"),
label = c("Chinese speakers: \nfaces",
"Chinese speakers: \nChinese characters",
"English speakers: \nEnglish words",
"English speakers: \nChinese characters"), # levels(df_inex_LO_area$Stimuli),
x = .5, # c(1, 1.1, 1.2, 1.2),
y = 1.05
)
plot_inex_LO_area <- ggplot(df_inex_LO_area, aes(y = mean, x = Area)) +
geom_col(position = "dodge", width = .5, fill = "#CDCDC8") +
facet_grid(Stimuli ~ Hemisphere, scales = "free_x", space = "free_x",
switch = "x",
labeller = labeller(Hemisphere = c(left = "left hemisphere", right = "right hemisphere"))) +
geom_errorbar(mapping = aes(ymin = lower.CL, ymax = upper.CL), linetype = 1, # set the error bar
show.legend = FALSE, width = 0.25, alpha = .5,
position = position_dodge(width=0.9)) +
geom_hline(yintercept = 0.5, linetype = 5, alpha = 0.5) + # add the line for 0.5 and 1 (y)
# scale_x_discrete(labels = toTitleCase(df_0$Stimuli)) +
scale_y_continuous(expand= c(0, 0), breaks = seq(0, 1, .25)) + # remove the space between columns and x axis
coord_cartesian(ylim = c(0.4, 1.1)) +
labs(title = "Intact vs. Exchange", x = expression(paste("Lateral Occipital Label Area (", mm^2, ")")), y = "Accuracy") + # set the names for main, x and y axises
geom_text(aes(label = sig_ast(p)), size = 7, nudge_y = 0.15) + # add starts to the significant columns
# geom_text(aes(label = round(mean, 2)), size = 4, nudge_y = 0.2) +
geom_text(data = dat_text_inex_LO_area, mapping = aes(x = x, y = y, label = label), size = 6, fontface = "bold", hjust=0) +
theme_bw() +
theme(
plot.title = element_text(lineheight=.8, face="bold", size = 24, hjust = 0.5, vjust = -1),
# plot.margin = margin(5, 170, 60, 40, unit = "pt"),
text = element_text(colour="black"),
axis.text = element_text(colour="black"),
axis.text.x = element_text(face = "bold", size = 16),
axis.text.y = element_text(size = 13),
axis.title.x = element_text(face = "bold", size = 20), # the size of the texts in plot
axis.title.y = element_text(size = 17, vjust = 2.5), # the size of the texts in plot
axis.line.x = element_line(colour = 'black', size=0.5, linetype='solid'),
axis.line.y = element_line(colour = 'black', size=0.5, linetype='solid'), # , arrow = arrow(length = unit(0.3, "cm"))
# axis.text.x = element_text(angle = 45, vjust = 0.5),
panel.border = element_blank(),
panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
panel.spacing = unit(1.5, "lines"),
# remove the facet background color
strip.text.x = element_text(size = 13), # element_blank(),
strip.text.y = element_blank(),
strip.background = element_blank(),
strip.placement = "outside",
) +
NULL
# ggsave('plot_decode_LO_area_inex.pdf', plot_inex_LO_area, width = 8, height = 16)
plot_inex_LO_area
dat_text_inex_LO_area_lr_fw <- data.frame(
Stimuli = levels(df_inex_LO_area$Stimuli)[1:2],
Hemisphere = "left",
label = c("Chinese speakers: \nfaces",
"Chinese speakers: \nChinese characters"),
x = .5, # c(1, 1.1),
y = 1.05
)
plot_inex_LO_area_E1 <- ggplot(filter(df_inex_LO_area, Exp == "E1"), aes(y = mean, x = Area)) +
geom_col(position = "dodge", width = .5, fill = "#CDCDC8") +
facet_grid(Stimuli ~ Hemisphere, scales = "free_x", space = "free_x",
switch = "x",
labeller = labeller(Hemisphere = c(left = "left hemisphere", right = "right hemisphere"))) +
geom_errorbar(mapping = aes(ymin = lower.CL, ymax = upper.CL), linetype = 1, # set the error bar
show.legend = FALSE, width = 0.25, alpha = .5,
position = position_dodge(width=0.9)) +
geom_hline(yintercept = 0.5, linetype = 5, alpha = 0.5) + # add the line for 0.5 and 1 (y)
# scale_x_discrete(labels = toTitleCase(df_0$Stimuli)) +
scale_y_continuous(expand= c(0, 0), breaks = seq(0, 1, .25)) + # remove the space between columns and x axis
coord_cartesian(ylim = c(0.4, 1.1)) +
labs(x = expression(paste("Lateral Occipital Label Area (", mm^2, ")")), y = "Accuracy") + # set the names for main, x and y axises Experiment 1
geom_text(aes(label = sig_ast(p)), size = 7, nudge_y = 0.15) + # add starts to the significant columns
# geom_text(aes(label = round(mean, 2)), size = 4, nudge_y = 0.2) +
geom_text(data = dat_text_inex_LO_area_lr_fw, mapping = aes(x = x, y = y, label = label), size = 4.5, fontface = "bold", hjust=0) +
theme_bw() +
theme(
plot.title = element_text(lineheight=.8, face="bold", size = 24, hjust = 0.5, vjust = -1),
# plot.margin = margin(5, 170, 60, 40, unit = "pt"),
text = element_text(colour="black"),
axis.text = element_text(colour="black"),
axis.text.x = element_text(face = "bold", size = 16),
axis.text.y = element_text(size = 13),
axis.title.x = element_text(face = "bold", size = 20), # the size of the texts in plot
axis.title.y = element_text(size = 17, vjust = 2.5), # the size of the texts in plot
axis.line.x = element_line(colour = 'black', size=0.5, linetype='solid'),
axis.line.y = element_line(colour = 'black', size=0.5, linetype='solid'), # , arrow = arrow(length = unit(0.3, "cm"))
# axis.text.x = element_text(angle = 45, vjust = 0.5),
panel.border = element_blank(),
panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
panel.spacing = unit(1.5, "lines"),
# remove the facet background color
strip.text.x = element_text(size = 15), # element_blank(),
strip.text.y = element_blank(),
strip.background = element_blank(),
strip.placement = "outside",
) +
NULL
dat_text_inex_LO_area_lr_ec <- data.frame(
Stimuli = levels(df_inex_LO_area$Stimuli)[3:4],
Hemisphere = "left",
label = c("English speakers: \nEnglish words",
"English speakers: \nChinese characters"), # levels(df_inex_LO_area$Stimuli)[3:4],
x = .5, # c(1.1, 1.2),
y = 1.05
)
plot_inex_LO_area_E2 <- ggplot(filter(df_inex_LO_area, Exp == "E2"), aes(y = mean, x = Area)) +
geom_col(position = "dodge", width = .5, fill = "#CDCDC8") +
facet_grid(Stimuli ~ Hemisphere, scales = "free_x", space = "free_x",
switch = "x",
labeller = labeller(Hemisphere = c(left = "left hemisphere", right = "right hemisphere"))) +
geom_errorbar(mapping = aes(ymin = lower.CL, ymax = upper.CL), linetype = 1, # set the error bar
show.legend = FALSE, width = 0.25, alpha = .5,
position = position_dodge(width=0.9)) +
geom_hline(yintercept = 0.5, linetype = 5, alpha = 0.5) + # add the line for 0.5 and 1 (y)
# scale_x_discrete(labels = toTitleCase(df_0$Stimuli)) +
scale_y_continuous(expand= c(0, 0), breaks = seq(0, 1, .25)) + # remove the space between columns and x axis
coord_cartesian(ylim = c(0.4, 1.1)) +
labs(x = expression(paste("Lateral Occipital Label Area (", mm^2, ")")), y = "Accuracy") + # set the names for main, x and y axises Experiment 2
geom_text(aes(label = sig_ast(p)), size = 7, nudge_y = 0.15) + # add starts to the significant columns
# geom_text(aes(label = round(mean, 2)), size = 4, nudge_y = 0.2) +
geom_text(data = dat_text_inex_LO_area_lr_ec, mapping = aes(x = x, y = y, label = label), size = 4.5, fontface = "bold", hjust=0) +
theme_bw() +
theme(
plot.title = element_text(lineheight=.8, face="bold", size = 24, hjust = 0.5, vjust = -1),
# plot.margin = margin(5, 170, 60, 40, unit = "pt"),
text = element_text(colour="black"),
axis.text = element_text(colour="black"),
axis.text.x = element_text(face = "bold", size = 16),
axis.text.y = element_text(size = 13),
axis.title.x = element_text(face = "bold", size = 20), # the size of the texts in plot
axis.title.y = element_text(size = 17, vjust = 2.5), # the size of the texts in plot
axis.line.x = element_line(colour = 'black', size=0.5, linetype='solid'),
axis.line.y = element_line(colour = 'black', size=0.5, linetype='solid'), # , arrow = arrow(length = unit(0.3, "cm"))
# axis.text.x = element_text(angle = 45, vjust = 0.5),
panel.border = element_blank(),
panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
panel.spacing = unit(1.5, "lines"),
# remove the facet background color
strip.text.x = element_text(size = 15), # element_blank(),
strip.text.y = element_blank(),
strip.background = element_blank(),
strip.placement = "outside",
) +
NULL
plot_inex_LO_area_lr <- ggarrange(plot_inex_LO_area_E1, plot_inex_LO_area_E2, ncol = 2,
# labels = c("", "Intact vs. Exchange"),
# label.x = -0.36,
# label.y = 1,
font.label = list(size = 24))
# ggsave('plot_decode_LO_area_inex_lr.pdf', plot_inex_LO_area_lr, width = 15, height = 8)
plot_inex_LO_area_lr
df_parts_LO_area <- df_decode_LO_area %>%
filter(str_detect(Stimuli, "vs.", negate = TRUE),
Layout != "Intact\nvs.\nExchange") %>%
mutate(Stimuli = as_factor(Stimuli))
df_parts_LO_area$Stimuli <- fct_relevel(df_parts_LO_area$Stimuli, "English", after = Inf)
df_parts_LO_area$Stimuli <- fct_relevel(df_parts_LO_area$Stimuli, "Chinese", after = Inf)
dat_parts_inex_LO_area <- data.frame(
Stimuli = levels(df_parts_LO_area$Stimuli),
Hemisphere = c("left"),
label = c("Chinese speakers: \nfaces",
"Chinese speakers: \nChinese characters",
"English speakers: \nEnglish words",
"English speakers: \nChinese characters"),
x = .5, # c(1, 1.1, 1.2, 1.2),
y = 1.05
)
plot_topbottom_LO_area <- ggplot(df_parts_LO_area, aes(y = mean, x = Area)) +
geom_col(position = "dodge", width = .5, fill = "#CDCDC8") +
facet_grid(Stimuli ~ Hemisphere, scales = "free_x", space = "free_x",
switch = "x",
labeller = labeller(Hemisphere = c(left = "left hemisphere", right = "right hemisphere"))) +
geom_errorbar(mapping = aes(ymin = lower.CL, ymax = upper.CL), linetype = 1, # set the error bar
show.legend = FALSE, width = 0.25, alpha = .5,
position = position_dodge(width=0.9)) +
geom_hline(yintercept = 0.5, linetype = 5, alpha = 0.5) + # add the line for 0.5 and 1 (y)
# scale_x_discrete(labels = toTitleCase(df_0$Stimuli)) +
scale_y_continuous(expand= c(0, 0), breaks = seq(0, 1, .25)) + # remove the space between columns and x axis
coord_cartesian(ylim = c(0.4, 1.1)) +
labs(title = "Top vs. bottom; left vs. right", x = expression(paste("Lateral Occipital Label Area (", mm^2, ")")), y = "Accuracy") + # set the names for main, x and y axises
geom_text(aes(label = sig_ast(p)), size = 7, nudge_y = 0.15) + # add starts to the significant columns
# geom_text(aes(label = round(mean, 2)), size = 4, nudge_y = 0.2) +
geom_text(data = dat_parts_inex_LO_area, mapping = aes(x = x, y = y, label = label), size = 6, fontface = "bold", hjust=0) +
theme_bw() +
theme(
plot.title = element_text(lineheight=.8, face="bold", size = 24, hjust = 0.5, vjust = -1),
# plot.margin = margin(5, 170, 60, 40, unit = "pt"),
text = element_text(colour="black"),
axis.text = element_text(colour="black"),
axis.text.x = element_text(face = "bold", size = 16),
axis.text.y = element_text(size = 13),
axis.title.x = element_text(face = "bold", size = 20), # the size of the texts in plot
axis.title.y = element_text(size = 17, vjust = 2.5), # the size of the texts in plot
axis.line.x = element_line(colour = 'black', size=0.5, linetype='solid'),
axis.line.y = element_line(colour = 'black', size=0.5, linetype='solid'), # , arrow = arrow(length = unit(0.3, "cm"))
# axis.text.x = element_text(angle = 45, vjust = 0.5),
panel.border = element_blank(),
panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
panel.spacing = unit(1.5, "lines"),
# remove the facet background color
strip.text.x = element_text(size = 15), # element_blank(),
strip.text.y = element_blank(),
strip.background = element_blank(),
strip.placement = "outside",
) +
NULL
# ggsave('plot_decode_LO_area_topbottom.pdf', plot_topbottom_LO_area, width = 8, height = 16)
plot_topbottom_LO_area
dat_text_tb_all_lr_E1 <- data.frame(
Stimuli = levels(df_parts_LO_area$Stimuli)[1:2],
Hemisphere = "left",
label = c("Chinese speakers: \nfaces",
"Chinese speakers: \nChinese characters"), # levels(df_parts_LO_area$Stimuli)[1:2],
x = .5, # c(1, 1.1),
y = 1.05
)
plot_topbottom_LO_area_E1 <- ggplot(filter(df_parts_LO_area, Exp == "E1"), aes(y = mean, x = Area)) +
geom_col(position = "dodge", width = .5, fill = "#CDCDC8") +
facet_grid(Stimuli ~ Hemisphere, scales = "free_x", space = "free_x",
switch = "x",
labeller = labeller(Hemisphere = c(left = "left hemisphere", right = "right hemisphere"))) +
geom_errorbar(mapping = aes(ymin = lower.CL, ymax = upper.CL), linetype = 1, # set the error bar
show.legend = FALSE, width = 0.25, alpha = .5,
position = position_dodge(width=0.9)) +
geom_hline(yintercept = 0.5, linetype = 5, alpha = 0.5) + # add the line for 0.5 and 1 (y)
# scale_x_discrete(labels = toTitleCase(df_0$Stimuli)) +
scale_y_continuous(expand= c(0, 0), breaks = seq(0, 1, .25)) + # remove the space between columns and x axis
coord_cartesian(ylim = c(0.4, 1.1)) +
labs(x = expression(paste("Lateral Occipital Label Area (", mm^2, ")")), y = "Accuracy") + # set the names for main, x and y axises Experiment 1
geom_text(aes(label = sig_ast(p)), size = 7, nudge_y = 0.15) + # add starts to the significant columns
# geom_text(aes(label = round(mean, 2)), size = 4, nudge_y = 0.2) +
geom_text(data = dat_text_tb_all_lr_E1, mapping = aes(x = x, y = y, label = label), size = 5, fontface = "bold", hjust=0) +
theme_bw() +
theme(
plot.title = element_text(lineheight=.8, face="bold", size = 24, hjust = 0.5, vjust = -1),
# plot.margin = margin(5, 170, 60, 40, unit = "pt"),
text = element_text(colour="black"),
axis.text = element_text(colour="black"),
axis.text.x = element_text(face = "bold", size = 16),
axis.text.y = element_text(size = 13),
axis.title.x = element_text(face = "bold", size = 20), # the size of the texts in plot
axis.title.y = element_text(size = 17, vjust = 2.5), # the size of the texts in plot
axis.line.x = element_line(colour = 'black', size=0.5, linetype='solid'),
axis.line.y = element_line(colour = 'black', size=0.5, linetype='solid'), # , arrow = arrow(length = unit(0.3, "cm"))
# axis.text.x = element_text(angle = 45, vjust = 0.5),
panel.border = element_blank(),
panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
panel.spacing = unit(1.5, "lines"),
# remove the facet background color
strip.text.x = element_text(size = 15), # element_blank(),
strip.text.y = element_blank(),
strip.background = element_blank(),
strip.placement = "outside",
) +
NULL
dat_text_tb_all_lr_E2 <- data.frame(
Stimuli = levels(df_parts_LO_area$Stimuli)[3:4],
Hemisphere = "left",
label = c("English speakers: \nEnglish words",
"English speakers: \nChinese characters"), # levels(df_parts_LO_area$Stimuli)[3:4],
x = .5, # c(1.1, 1.2),
y = 1.05
)
plot_topbottom_LO_area_E2 <- ggplot(filter(df_parts_LO_area, Exp == "E2"), aes(y = mean, x = Area)) +
geom_col(position = "dodge", width = .5, fill = "#CDCDC8") +
facet_grid(Stimuli ~ Hemisphere, scales = "free_x", space = "free_x",
switch = "x",
labeller = labeller(Hemisphere = c(left = "left hemisphere", right = "right hemisphere"))) +
geom_errorbar(mapping = aes(ymin = lower.CL, ymax = upper.CL), linetype = 1, # set the error bar
show.legend = FALSE, width = 0.25, alpha = .5,
position = position_dodge(width=0.9)) +
geom_hline(yintercept = 0.5, linetype = 5, alpha = 0.5) + # add the line for 0.5 and 1 (y)
# scale_x_discrete(labels = toTitleCase(df_0$Stimuli)) +
scale_y_continuous(expand= c(0, 0), breaks = seq(0, 1, .25)) + # remove the space between columns and x axis
coord_cartesian(ylim = c(0.4, 1.1)) +
labs(x = expression(paste("Lateral Occipital Label Area (", mm^2, ")")), y = "Accuracy") + # set the names for main, x and y axises Experiment 2
geom_text(aes(label = sig_ast(p)), size = 7, nudge_y = 0.15) + # add starts to the significant columns
# geom_text(aes(label = round(mean, 2)), size = 4, nudge_y = 0.2) +
geom_text(data = dat_text_tb_all_lr_E2, mapping = aes(x = x, y = y, label = label), size = 5, fontface = "bold", hjust=0) +
theme_bw() +
theme(
plot.title = element_text(lineheight=.8, face="bold", size = 24, hjust = 0.5, vjust = -1),
# plot.margin = margin(5, 170, 60, 40, unit = "pt"),
text = element_text(colour="black"),
axis.text = element_text(colour="black"),
axis.text.x = element_text(face = "bold", size = 16),
axis.text.y = element_text(size = 13),
axis.title.x = element_text(face = "bold", size = 20), # the size of the texts in plot
axis.title.y = element_text(size = 17, vjust = 2.5), # the size of the texts in plot
axis.line.x = element_line(colour = 'black', size=0.5, linetype='solid'),
axis.line.y = element_line(colour = 'black', size=0.5, linetype='solid'), # , arrow = arrow(length = unit(0.3, "cm"))
# axis.text.x = element_text(angle = 45, vjust = 0.5),
panel.border = element_blank(),
panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
panel.spacing = unit(1.5, "lines"),
# remove the facet background color
strip.text.x = element_text(size = 15), # element_blank(),
strip.text.y = element_blank(),
strip.background = element_blank(),
strip.placement = "outside",
) +
NULL
plot_topbottom_LO_area_lr <- ggarrange(plot_topbottom_LO_area_E1, plot_topbottom_LO_area_E2, ncol = 2,
labels = c("A", "B"),
# label.x = -0.6,
# label.y = 1,
font.label = list(size = 24))
# ggsave('plot_decode_LO_area_topbottom_lr.pdf', plot_topbottom_LO_area_lr, width = 15, height = 8)
plot_topbottom_LO_area_lr
# rstudioapi::versionInfo()
sessionInfo()
## R version 4.0.5 (2021-03-31)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Big Sur 10.16
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] tools stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] ggpubr_0.4.0 emmeans_1.6.3 lmerTest_3.1-3 afex_0.28-1 lme4_1.1-26 Matrix_1.3-2 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.5 purrr_0.3.4 readr_1.4.0 tidyr_1.1.3 tibble_3.1.1 ggplot2_3.3.5 tidyverse_1.3.1
##
## loaded via a namespace (and not attached):
## [1] nlme_3.1-152 fs_1.5.0 lubridate_1.7.10 httr_1.4.2 numDeriv_2016.8-1.1 backports_1.2.1 utf8_1.2.1 R6_2.5.0 DBI_1.1.0 colorspace_1.4-1 withr_2.4.2 tidyselect_1.1.0 curl_4.3.1 compiler_4.0.5 cli_2.5.0 rvest_1.0.0 xml2_1.3.2 labeling_0.4.2 scales_1.1.1 mvtnorm_1.1-1 digest_0.6.27 foreign_0.8-81
## [23] minqa_1.2.4 rmarkdown_2.7 rio_0.5.26 pkgconfig_2.0.3 htmltools_0.5.1.1 highr_0.9 dbplyr_2.1.1 rlang_0.4.11 readxl_1.3.1 rstudioapi_0.13 farver_2.0.3 generics_0.1.0 jsonlite_1.7.2 zip_2.1.1 car_3.0-10 magrittr_2.0.1 Rcpp_1.0.6 munsell_0.5.0 fansi_0.4.2 abind_1.4-5 lifecycle_1.0.0 stringi_1.6.1
## [45] yaml_2.2.1 carData_3.0-4 MASS_7.3-53.1 plyr_1.8.6 grid_4.0.5 parallel_4.0.5 crayon_1.4.1 lattice_0.20-41 cowplot_1.1.1 haven_2.3.1 splines_4.0.5 hms_1.0.0 knitr_1.33 pillar_1.6.0 boot_1.3-27 ggsignif_0.6.1 estimability_1.3 reshape2_1.4.4 reprex_2.0.0 glue_1.4.2 evaluate_0.14 data.table_1.14.0
## [67] modelr_0.1.8 vctrs_0.3.8 nloptr_1.2.2.2 cellranger_1.1.0 gtable_0.3.0 assertthat_0.2.1 xfun_0.22 openxlsx_4.2.3 xtable_1.8-4 broom_0.7.6 rstatix_0.7.0 coda_0.19-4 statmod_1.4.35 ellipsis_0.3.2
A work by Haiyang Jin